You are viewing a single comment's thread. Return to all comments →
Great solution. Isn't the space complexity O(n)? Since you create an array of n elements how is the space complexity O(1)?
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
Great solution. Isn't the space complexity O(n)? Since you create an array of n elements how is the space complexity O(1)?