Technical Interview Question: 3Sum [Leetcode]

preview_player
Показать описание
Join me in analyzing and coding out the technical question 3Sum, ranked as one of the most common Technical Interview Questions asked by Tech companies.

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

I watch many videos before for understand that skip logic but I didn’t understand but with you video I completely understand it . thanks bro

singhlovepreet
Автор

This is too awesome. Thank you!. Please keep uploading.

BhaiyaDesi
Автор

This is great. Your voice & diction are nice, the explanations are pretty clear. Thank you!

rafaelsofi-zada
Автор

I think it's still linear search, not binary search. Binary search would split the list in half to find an item in O(logn) time.

aswinbeats
Автор

Can you expand on why converting the set to an array will cause it to be come O(N)?


Also, your videos are the best; I hope you make more. I've been failing hard in SWE interviews for the past year. Also, it's hard finding python leetcode videos where the explainer doesn't have a super thicc Indian accent.

TooManyPBJs
Автор

Edit: To clarify, the Time Complexity is N^2 because for our sweep, we're doing a scan of all numbers to form our triplet. The binary search I'm referring to here is more like a two pointer linear sweep, which in this case takes a Time Complexity of O(N) rather than O(NlgN) each.

RandomExpress
welcome to shbcf.ru