4Sum II | Leetcode 454 | Live coding session 🔥🔥🔥 | 3 Approaches | o(n2) | O(n3) | O(n4)

preview_player
Показать описание
Here is the solution to "4Sum II" leetcode question. Hope you have a great time going through it.

1) 0:00 Explaining the problem out loud
2) 1:10 Algorithm walkthrough
3) 2:00 Solution approach
4) 6:00 Coding

👉 Solutions

🔥🔥🔥🔥👇👇👇 For discussion/feedback/humour/doubts/new openings

🔴 Checkout the series: 🔥🔥🔥

🔥🔥🔥 Leetcode Monthly Contest Playlist

PS : Please increase the speed to 1.25X
Рекомендации по теме
Комментарии
Автор

For O(n^3) approach we can also use frequency map of 4th array to find the fourth value.

utsavgupta
Автор

Amazing Question🔥
An interesting follow up would be kSum II

sonalkumar
Автор

Thanks for the video, I have one small doubt like for the permutaion we generally multiply the ways right ?? But here why we are just counting like count += ?? Why

ChandraShekhar-bycd
Автор

I think the O(n^3) solution you mentioned won't work, since arrays here can have duplicates. We need to use a hasmap instead for a O(n^3) solution

sumukhbhat
join shbcf.ru