Noob O(n log n) Developer vs Strong O(n) Programmer in Longest Consecutive Sequence, Leetcode 128

preview_player
Показать описание
FAANG Coding Interviews / Data Structures and Algorithms / Leetcode
Рекомендации по теме
Комментарии
Автор

Thank you for watching the video! This was shortened to fit in the shorts feed, please click the related video link to see the whole thing (trust me it's worth it!)

GregHogg
Автор

I think your solution takes O(n log n) time due to the sort(). The requirement in question clearly mentions constraint of O(n) time.

akhilhandoo
Автор

Cycle sort will give ans in n complexity easily

rushikesh
Автор

I needed a couple of weeks to understand LCS.

at-sushi
Автор

I wondered how were you able to solve it in 3 seconds.

Saheryk
Автор

Every time i see i realise i code like a noob programmer 😭😭

SathvikSagar
Автор

Interview questions like this are stupid, never in my 8 years programming professionally have I ever run into any problem like this leetcode style nonsense

dbarless
Автор

Damn dude you make every so simple. I gotta take the time to implement some of these

hlubradio
Автор

Bruh i'd just throw a hashmap on it 😂😂

guilhermewxs
Автор

what us the site of the challenges? leetcode?

Dri
Автор

If this is noob level, then i don't know what level i am 💀

krishwanthkishore
Автор

Does transferring nums into set gives us sorted data with no duplicates? If yes, sorting is not needed, in C++ set always gives values in sorted format

aakashs
Автор

well yeah this solution is faster, but on leetcode yours beats only 5% :O

ImRafaelPL
visit shbcf.ru