Ashish Patel
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.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Ashish Patel
Ashish Patel

Written by Ashish Patel

Big Data Engineer at Skyscanner , loves Competitive programming, Big Data.

No responses yet

Write a response