Longest Common Prefix | LeetCode 14 | Easy

preview_player
Показать описание

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

Why are we taking the first string in the array as pre? what if the first string in the array is total different from all other strings?
e.g. ["random", "hello", "hell", "hellish"]. in this example the answer should be 'hell' but with this solution it will return an emoty string.

uditchoudhary
Автор

thank you so much find best explanation after so much vedios

poojamaheshwari
Автор

does the second approach, has higher time complexity, then the first approach

rokingala
Автор

thank you. I am finding explanation for vertical scanning. Great explanation!

phuongvy
Автор

this the best explanation video. keep posting new videos!

czerox