Recently I came across this problem in hacker rank. This problem is really fascinating as it teaches you to handle a lot of edge cases and variables at the same time. So, I thought of writing an article on this one. I hope you will enjoy it as much as I enjoyed solving it. Simplified Problem Statement You will be given an array of N integers. This array could be … [Read more...] about Almost Sorted Hacker Rank Problem (Medium Difficulty)