3sum Leetcode Medium | Most popular interview coding question | Three sum leetcode with solution

  Рет қаралды 8,059

Algo Tamizha

Algo Tamizha

Күн бұрын

Пікірлер: 36
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
Time Complexity : O(n2) Space Complexity : O(n)
@diwakarj116
@diwakarj116 2 ай бұрын
Superb explanation thank you for your explanation and demonstration sir
@albert.praveen
@albert.praveen Жыл бұрын
the way of teaching verithanam bro ❤‍🔥
@sharanyameiyyappan
@sharanyameiyyappan Жыл бұрын
Really great explanation... Have watched other explanations in english.. but this is very understandable... Thanks
@AlgoTamizha
@AlgoTamizha Жыл бұрын
glad it was helpful
@1qwertyuiop1000
@1qwertyuiop1000 Жыл бұрын
Line no: 10 will overright index value sine there are duplicate values in the input.. May be we might need to keep tract of all indexes in a hash as a seperate list collection?
@jayasurya1249
@jayasurya1249 3 жыл бұрын
thumbnail vera level ya
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
purinjavan pistah 😂😂
@jayasurya1249
@jayasurya1249 3 жыл бұрын
@@AlgoTamizha 😂😂😂😂
@murali-77
@murali-77 Жыл бұрын
Nice explanation sir !
@smile-bi8ng
@smile-bi8ng Жыл бұрын
Bro doubt hashmap la -1 2 times repeat agirukku value la entha index varum
@Setchuko
@Setchuko Жыл бұрын
anna its realy helpful
@AlgoTamizha
@AlgoTamizha Жыл бұрын
glad you find it helpful.... keep supporting
@harishrajaselvan
@harishrajaselvan 3 ай бұрын
Thumbnail🗿
@dilipv.p5097
@dilipv.p5097 3 жыл бұрын
Ipdi panalamae brother Like sliding window concept instead of using maps Example -4, -1, -1, 0, 1, 2 idhula Frst window size 2 vachu adha slide panite pogalam [-4, -1], -1, 0, 1, 2 ipo andha frst two add panna -5 varum ippa adutha loop la remaining number la enga +5 iruku pakalam Then next iteration -4, [-1, -1], 0, 1, 2 -1-1=-2 Now we need to find 2 in remaining numbers like 0, 1, 2 We'll find it and we can add it ro our set Then next iteration -4, -1, [-1, 0], 1, 2 -1+0 = -1 Now we need +1 which is next to 0 Now we can add -1, 0,1 in our set After that -4, -1, -1, [0, 1], 2 we need 1 but there is only 2 remains Then -4, -1, -1, 0, [1, 2 ] now there is no numbers left to add as 3rd integer And our loop ends Idhu crct ah varum la brother?
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
interesting idea 🙌. aana sliding window pannaumbodhu pakathula ulla numbers matum dhan consider panromla, aana namma tripletla ulla moonu number ume thalli thalli pakathula illama irka chance irku, so idhu ella caselayum work aahadhu. but nice thinking.😊
@dilipv.p5097
@dilipv.p5097 3 жыл бұрын
@@AlgoTamizha adhukundhan frst sort panidron la brother
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
take -3 -2 -1 0 4. idhula -3-1 4 idhu moonum oru answer. aana edhuvume pakathu pakathula irkadhu
@dilipv.p5097
@dilipv.p5097 3 жыл бұрын
@@AlgoTamizha ohhh ok brother
@mugunthanm2686
@mugunthanm2686 Жыл бұрын
unga upcoming placement series la python laiyum code panuga plz......explanation lam bangam
@AlgoTamizha
@AlgoTamizha Жыл бұрын
bro code lam endha language nu kavala padadheenga explanation ah apdiye translate panna porom code la avlo dhan. I will try to include python if possible.. but I would suggest watching the entire video and go to leetcode and try to solve in python. this way you will become really good
@mugunthanm2686
@mugunthanm2686 Жыл бұрын
@@AlgoTamizha ok na 🌝
@akashdestiny9126
@akashdestiny9126 3 жыл бұрын
Bro oru doubt ethuna loop use pannuromo Avlo time complexity increase aguma example 2 loop use panna time complexity O(n^2)
@dilipv.p5097
@dilipv.p5097 3 жыл бұрын
Loop inside loops increase aahurapo Time complexity increase aahum
@dilipv.p5097
@dilipv.p5097 3 жыл бұрын
Example For() { For() { For() { } } } Idhuku O(n^3) varum If I'm not wrong
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
correct dhan but, loop la evlo vati iterate panromnradhu pakanum, ovvoru looplayum n times irku apdina, n*n*n = n3.
@manimegalaic1261
@manimegalaic1261 Жыл бұрын
thank u anna
@AlgoTamizha
@AlgoTamizha Жыл бұрын
glad you found it helpful. keep supporting :)
@sandys4009
@sandys4009 3 жыл бұрын
Bro prgm screen knjm maximize panni irukalam bro
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
thanks for the suggestion bro.. next time pannirren.. sorry for this time 😊
@abishek553
@abishek553 3 жыл бұрын
Bro code discription la podalaya?
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
potachu bro. maranten
@abishek553
@abishek553 3 жыл бұрын
Anna public static void main use Panna venama
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
leetcode la direct ah namma function matum type panra mari kudupanga, full program eludha theva illa. leetcode la apdiye paste pani run panunga
@abishek553
@abishek553 3 жыл бұрын
@@AlgoTamizha epdi bro leetcode eclipse la open Pannurathu
@AlgoTamizha
@AlgoTamizha 3 жыл бұрын
leetcode oru website bro, desc la problem link irku parunga open panni parunga
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 1,3 МЛН
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 68 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 321 МЛН
3Sum - Leetcode 15 - 2 Pointers (Python)
9:42
Greg Hogg
Рет қаралды 13 М.
15. 3 Sum - LeetCode - Python - Tamil
33:43
Code Meal
Рет қаралды 2,7 М.
3 Sum | Brute -  Better - Optimal with Codes
38:25
take U forward
Рет қаралды 346 М.
LeetCode 3Sum Solution Explained - Java
10:00
Nick White
Рет қаралды 200 М.
Spiral Matrix | Java | Tamil | LeetCode : 54
11:28
CSE MAANAVAN
Рет қаралды 1,1 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 1,3 МЛН