Grokking Oracle Coding Interview
Ask Author
Back to course home

0% completed

Vote For New Content
issues with question

camelBack

Mar 7, 2024

The question is deceiving a bit - asking for a recursive solution, while the sample answer is not a recursive answer.

Also, what about more than 2 adjacent characters? 'abcccba'?

5

0

Comments
Comments
Kinshuk Agrawal
Kinshuk Agrawal2 years ago

Exactly my concerns also. Not a well-defined question.

Miguel
Miguel 2 years ago

I agree that the problem definition should emphasis that they want you to remove duplicate pairs (in other words, two adjacent and equal letters). That way your concern about > 2 adjacent duplicates is addressed:

odd adjacent duplicates: 'abcccba' -> 'abcba'

e...

L
lejafilip a year ago

It is easy to handle while stack.

On this page