diff --git a/hws/03_amazon_prime/recommendation.cpp b/hws/03_amazon_prime/recommendation.cpp index af8327e..185a06b 100644 --- a/hws/03_amazon_prime/recommendation.cpp +++ b/hws/03_amazon_prime/recommendation.cpp @@ -15,13 +15,12 @@ void RecommendationSystem::recommendMovies(int userId, int numRecommendations, i // calculate similarity scores between the target user (userId) and other users // compute the similarity between the target user and all other users based on their movie ratings using the cosine similarity measure. The resulting similarity scores are stored in the similarityScores array. This information can then be used to recommend movies to the target user based on the preferences of similar users. - double similarityScores[numUsers]; + double* similarityScores = new double[numUsers]; for(int i=0; i