Reverse Words In A String - 151. LeetCode - Java

preview_player
Показать описание
Reverse Words In A String - 151. LeetCode - Java

Рекомендации по теме
Комментарии
Автор

For Case 3:
Input: "a good example"
Expected Output: "example good a"

I would expect that we should also consider the spaces properly between words. This would make the question more challenging and eliminate many solution approaches I checked.

cagataysen
Автор

when I type regex it seems to give me an error

aramisordonez
Автор

I belive that this not the right solution, we can easily see that this Question want us to use 2 pointer.

BakaUni