Pergunta de entrevista da empresa Google

Reverse the word order in a string.

Respostas da entrevista

Sigiloso

7 de out. de 2010

Flip entire string, then flip individual words.

2

Sigiloso

2 de jul. de 2019

// In java String str[]=givenString.split(" "); for(int a=str.length-1;a>=0;a--) System.out.print(str[a]+" ");

Sigiloso

7 de jan. de 2011

Use String Tokenizer to parse words from string and subsequently push each word onto a stack. When there are no more tokens, pop the stack and concatenate back into string.

2