Applied via LinkedIn EasyJob Apply and gave Agoda Online Assessment. I was asked below DSA and API problems.
- For an array of n integers, arr[n], you can perform the followinng operations up to k times:
- Utilize the HTTP GET method to retrieve details about recent TV shows. Query https://jsonmock.hackerrank.com/api//tvseries to localte all shows within a specific genre.The reults are paginated. To accsess more pages, add ?page={num} to the URL where {num} represents page number. Response is a JSON object with fields :
page: number, per_page: number, total = number, total_pages: number , data: array of TV series records
Each element of data array has name, runtime_of_series, certificate, runtime_of_episodes, genre, imdb_rating, overview, no_of_votes, id. Given a genre, find the series with highest imdb. If there is a tie, return alphabeticlally lower name.
Write a function bestInGenre(String genre) and return string (highest rated imdb show in that genre)