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.
The time complexity is O(n), i think?? n being the number of characters of string. Excellect solution.
But what about space? Here its O(n), n being the size of stack.
Is it possible to solve in C using O(1) space?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Super Reduced String
You are viewing a single comment's thread. Return to all comments →
The time complexity is O(n), i think?? n being the number of characters of string. Excellect solution. But what about space? Here its O(n), n being the size of stack. Is it possible to solve in C using O(1) space?