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.
- Prepare
- Algorithms
- Strings
- Mars Exploration
- Discussions
Mars Exploration
Mars Exploration
Sort by
recency
|
1049 Discussions
|
Please Login in order to post a comment
MY CPP code C++
Time=O(N)
Here is my c++ solution, you can find the explanation here : https://youtu.be/Gf0fpGE83r4
My solution in Java:
The code with time complexity of O(n) and space complexity O(1)