We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Billboards
Billboards
Sort by
recency
|
45 Discussions
|
Please Login in order to post a comment
Phew, so finally solved this after weeks. It basically comes down to idea of min_queue problem. i.e, you can look up minimum of 'M' consecutive terms as you move from left to right in an array in O(1). Salah Al Din Metro Station Dubai
Here is my solution in java, javascript, python, C, C++, Csharp HackerRank Billboards Problem Solution
Here is Billboards problem solution - https://programs.programmingoneonone.com/2021/07/hackerrank-billboards-problem-solution.html
I'm having a hard time understanding the explanation , can you express it in details ? surah to get love back
Phew, so finally solved this after weeks. It basically comes down to idea of min_queue problem. i.e, you can look up minimum of 'M' consecutive terms as you move from left to right in an array in O(1).
Two stacks!