Skip to content
LEWIS C. LIN AMAZON BESTSELLING AUTHOR
Go back

Technical Interview Question 4: Given a string with words and multiple white spaces around them, how would you trim it with only 1 white space between the words?

Edit page

Given a string with words and multiple white spaces around them, how would you trim it with only 1 white space between the words? For ex: input str = ” Hello world ” output = “Hello world”.

Submit your answers in the comments and receive feedback.


Edit page
Share this post on:

Previous Post
Technical Interview Question 5: Design a server side implementation for employee security badging system.
Next Post
Technical Interview Question 3: How much it would cost to roll out a Google Product?