I am not able to understand the solution of the last problem from Hack the interview II -Global, a contest on Hackerrank which finished few days ago.It's labelled 'HARD'.
I don't get what is len = m-2-2*p in the first solution ? Although both the solutions are same.
It will be really helpful if someone explains me the solution. Thanks!