Microsoft Coding Interview Question - Print Words Vertically (LeetCode)

preview_player
Показать описание
Check out my interview prep platform for learning the patterns!

Here is a step by step explanation of a string based question asked at Microsoft.

To solve this string based problem, we must find the maximum length word in our array. Once we find the max, we use that number to know how many indices we must access for each word in our input string.
Рекомендации по теме
Комментарии
Автор

Better to use map<index, string> it will solve in O(n).

rupeshjha
Автор

line 20, must be
return word;
correct me, If am incorrect

babydriver
Автор

Isn’t it a good idea to just to continue instead of adding space?

kehugu
Автор

where were you all this time?
loved your explanation

abhinavghosh
Автор

Does the output have to be list s? or can you create another s?

liamkosar
Автор

how to do this in linear time complexity

aditiapar
Автор

in trim function .... why i is at sb.length.. why not sb.length()-1

PJ-flyk
join shbcf.ru