1 min readMay 15, 2020
Hi Prakhar Seth,
the time complexity of solution will be O(n) as the input itself it O(n),
and the time complexity of solution refers to the order of memory used in the whole solution.
Hi Prakhar Seth,
the time complexity of solution will be O(n) as the input itself it O(n),
and the time complexity of solution refers to the order of memory used in the whole solution.
Distraction-free reading. No ads.
Organize your knowledge with lists and highlights.
Tell your story. Find your audience.
Read member-only stories
Support writers you read most
Earn money for your writing
Listen to audio narrations
Read offline with the Medium app
Big Data Engineer at Skyscanner , loves Competitive programming, Big Data.