Design and implement the core logic for a video recommendation engine used in Freecine.

The engine should suggest videos as the user interacts with the platform, based on previous watch history, popularity, and user preferences.
Given a search query or recently watched video, the engine should return top recommended titles (e.g., related movies, trending series, or popular APK content).
Recommendations should be ranked either by frequency of views or relevance to user interests.
We will use the strategy pattern to allow ranking logic based on different strategies.
User Context – each user has a history of watched videos, genres, and languages.
Recommendation Engine – fetches related videos from the library.
Ranking Strategies – based on frequency (most watched) or relevance (genre + language match).
Updating Usage – each time a video is played, its view count should be updated in the system.
VideoNode (data structure to store videos & traverse by category/genre)
Context → language (e.g., English, Portuguese, Spanish) + genre (Action, Anime, Drama)
VideoEntry → metadata and details about each video
EntityType (Enum) → MOVIE, SERIES, ANIME, DOCUMENTARY, LIVE
RankStrategy → rankVideos(List availableVideos, String query)
FrequencyBased
RelevanceBased
RecommendationEngine (Facade class)
VideoNode
children
isEndOfVideo
viewCount
videoTitle
insertVideo(String videoTitle)
findVideo(String videoTitle)
getRecommendations(String prefix/query)
deleteVideo()
videoTitle
entryType
language
viewCount
VideoNode
RankStrategy
currentLanguage
contextHistory
addVideo()
recommend()
recordView()
initializeLanguage()