Facebook Asked This Coding Question 50 TIMES!!! | 3Sum - Leetcode 15

preview_player
Показать описание
leetcode, coding interview question, data structures, data structures and algorithms, faang
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

how can we store indices of duplicate elements in the given list in a dictionary ?

ganesh
Автор

Do you think these types of questions we can understand in short videos 😢

vikasgadari
Автор

There s another optimal way to do this is to without using the hash map

First sort the array then a for loop
n then a two pointer approach
Reply to this if you want the code for it

SahilGamingIndia
Автор

I tried to right your code in java but it returns that testcases passed but took to long

moradtaya
Автор

This can be done using Hasmap, hahset & sorting + 2 pointer!!

rohitbishoyi
Автор

i did the same in Cpp got a timelimit exceeded error

nikhilchoudhary
Автор

Im pretty sute "sorted()" returns None so you cant assign it to a variable.
At least it didnt work for me once and i had to do sort(), i might be wrong

darknight
Автор

I can solve this in linq in c# and cut all the BS logic in other languages, it is quite easier and quicker to use linq as a SQL which is super fast

vivekchaturvedi
join shbcf.ru