Domanda di colloquio di BlackRock

Inverse a sentence.

Risposte di colloquio

Anonimo

28 gen 2015

Reverse complete sentence as string reverse. Then reverse every word in it (using two variable i and j for index to hold one word, we can find word when we encounter space). Runtime O(n) + O(n) where n is length of string. no extra space required, everything is happening in-place

1

Anonimo

7 ago 2014

Tokenize the string... put each token in a stack... pop the stack and print it.

Anonimo

31 gen 2013

Just go through the sentence...