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?
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
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?
Time Complexity : O(n2)
Space Complexity : O(n)
Superb explanation thank you for your explanation and demonstration sir
the way of teaching verithanam bro ❤🔥
Really great explanation... Have watched other explanations in english.. but this is very understandable... Thanks
glad it was helpful
Nice explanation sir !
thumbnail vera level ya
purinjavan pistah 😂😂
@@AlgoTamizha 😂😂😂😂
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?
anna its realy helpful
glad you find it helpful.... keep supporting
Bro doubt hashmap la -1 2 times repeat agirukku value la entha index varum
thank u anna
glad you found it helpful. keep supporting :)
unga upcoming placement series la python laiyum code panuga plz......explanation lam bangam
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
@@AlgoTamizha ok na 🌝
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?
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.😊
@@AlgoTamizha adhukundhan frst sort panidron la brother
take -3 -2 -1 0 4. idhula -3-1 4 idhu moonum oru answer. aana edhuvume pakathu pakathula irkadhu
@@AlgoTamizha ohhh ok brother
Thumbnail🗿
Anna public static void main use Panna venama
leetcode la direct ah namma function matum type panra mari kudupanga, full program eludha theva illa. leetcode la apdiye paste pani run panunga
@@AlgoTamizha epdi bro leetcode eclipse la open Pannurathu
leetcode oru website bro, desc la problem link irku parunga open panni parunga
Bro oru doubt ethuna loop use pannuromo Avlo time complexity increase aguma example 2 loop use panna time complexity O(n^2)
Loop inside loops increase aahurapo
Time complexity increase aahum
Example
For() {
For() {
For() {
}
}
}
Idhuku O(n^3) varum
If I'm not wrong
correct dhan but, loop la evlo vati iterate panromnradhu pakanum, ovvoru looplayum n times irku apdina, n*n*n = n3.
Bro prgm screen knjm maximize panni irukalam bro
thanks for the suggestion bro.. next time pannirren.. sorry for this time 😊
Bro code discription la podalaya?
potachu bro. maranten