In this article, we put three technical skills testing tools up against each other in the battle of Hackerrank vs LeetCode vs Toggl Hire.
Actually I think problem statement is somewhat misleading. No need to mention range [L, R] at all. The intention is a variation to "Largest Rectangle" which is a classic stack problem on LeetCode. But you need to run Largest Rectangle twice: increased and decreased. View Code...