Better to add O(1) extra space solution also

There is an O(1) extra space solution for this problem. Which is present in the Java Data structure Course. It would be added as that concept is really good.

Thanks for pointing it out. We have added this solution in C++ and JavaScript. Your feedback is important to us.

Maida Ijaz | Developer Advocate