Design HashSet | EP 8

  Рет қаралды 33,005

Fraz

Fraz

Күн бұрын

Пікірлер: 187
@theOmKumar
@theOmKumar 2 жыл бұрын
1st method : we're only using zeros and ones, so it's better to make vector m; it saves lots of memory!
@darkelixir2517
@darkelixir2517 2 жыл бұрын
Well noticed! good idea to create a boolean array
@shivangisharma3690
@shivangisharma3690 2 жыл бұрын
You are so so good at teaching, you cleared all my doubts till date I wonder who else explains it so well
@PardeepSingh-cf8lf
@PardeepSingh-cf8lf 2 ай бұрын
it took me hardly 25 -30 minutes to get at 8 episodes of this serios Nd thanks a lot sir for uploaded amazing lectures
@raghvendrakhatri5848
@raghvendrakhatri5848 2 жыл бұрын
Lect - 9 completed, sir love♥️ the way you explain each and every concept, please keep creating such wonderful content 💯 your playlist are helping me alot in understanding the topics and improving my skills. Thankyou bhaiya ♥️
@rajyadav1337
@rajyadav1337 2 жыл бұрын
Within a day I'm almost very much confident about linkedList Sir. Thank you so much for providing so a wonderful contents. Keep motivating Sir.
@mohitroshan3856
@mohitroshan3856 2 жыл бұрын
It took 3hrs to reach EP 8. Less time , More concepts❤️‍🔥
@amt.7rambo670
@amt.7rambo670 2 жыл бұрын
what ijust took 2 hours
@UCSNRohit
@UCSNRohit 3 жыл бұрын
Yahi chahiye tha mujhe, boht confusing laga khud se padhne me, thnk you bhaiya!😍
@datasciencemlai8330
@datasciencemlai8330 2 жыл бұрын
badhiya series hai dada, much better than 1, 2 hours coz this content is crisp
@deepakdass4710
@deepakdass4710 Жыл бұрын
Yesterday, I started this and watched 7 episodes then practiced about 10-12 probles on GFG and LC. Now, I am starting this from the 8th EP
@beinghappy9223
@beinghappy9223 Жыл бұрын
Best video on design hashset till date
@rameshkhed7864
@rameshkhed7864 2 жыл бұрын
It took 1.30 hour to reach EP 8 ... U will easily clear concept so not hard to understand LL👍👍
@swarnimkamal2210
@swarnimkamal2210 2 жыл бұрын
maza aarha hain bhaiya , mera list bahut weak but thnx to you ab kaafi behtar horha hain, thnx:)
@technicalteam3298
@technicalteam3298 2 жыл бұрын
just about 2 hours because you keeps the things interesting
@akshyagarg2398
@akshyagarg2398 3 жыл бұрын
kaafi acha sikahaya bhaiya ek dum clear
@darkelixir2517
@darkelixir2517 2 жыл бұрын
took 2hours to reach this, learning new stl will need 1 hour more, so far so good
@BG-lj6fw
@BG-lj6fw 2 жыл бұрын
2-3 hrs....simultaneously taking notes and submitting solution on LC, CS
@utkarshsingh5390
@utkarshsingh5390 3 жыл бұрын
sabse bhadiya line thi bhaiyaa ki "search karlena hash functions kaafi difficult functions aajayenge unko use karlena"😀😂
@mohammadfraz
@mohammadfraz 3 жыл бұрын
😂😂
@akashgola2153
@akashgola2153 Жыл бұрын
Awesome Explanation 😍😍, Took sometime for the first time though.
@sahiljain2524
@sahiljain2524 3 жыл бұрын
Very good video and learn the new concept of linkedlist thank you
@areebahmadsiddiqui2648
@areebahmadsiddiqui2648 3 жыл бұрын
Mujhe 20 min hi laga lol Kal hi maine Linked List start kiya tha aur aj ap poori playlist leke a gae
@mohammadfraz
@mohammadfraz 3 жыл бұрын
😂 bahot badhiya , chalo ahh complete krlo jldi se
@ankur_6174
@ankur_6174 2 жыл бұрын
It took me 1 hr to reach here. Bcoz saare problems kr rkhe the pehle se.
@divyareddy7622
@divyareddy7622 2 жыл бұрын
bhaiya dry running the approach before code, during code and after code is the best explaination! please try to dry run more! thanks a lot!!!
@desihiphop4998
@desihiphop4998 3 жыл бұрын
Bhut tgda bhut tgda bhaiya 2 hr laga 8th episode tk !!!! ❤️❤️
@mohammadfraz
@mohammadfraz 3 жыл бұрын
12th is also uploaded
@desihiphop4998
@desihiphop4998 3 жыл бұрын
@@mohammadfraz bilkul bhiya cheack maarunga !!!!!!!
@adityaroychowdhury3709
@adityaroychowdhury3709 2 жыл бұрын
correct me if i understood wrong- this hashset, is just a 2D array, where 1Dimension is a vector and another D is a linked list branching out from each unit of the vector
@tanmoychowdhury5170
@tanmoychowdhury5170 2 жыл бұрын
right
@jobanpreetsingh2370
@jobanpreetsingh2370 2 жыл бұрын
Bhaarii concept 😮😮
@mohammadfraz
@mohammadfraz 2 жыл бұрын
🔥
@naziyakhan4096
@naziyakhan4096 9 ай бұрын
this is my 2nd day i started watching from 7th video today
@noobprogrammer3040
@noobprogrammer3040 3 жыл бұрын
Maza aagya bhaiya iss series me. LOVED IT ! please agli series dp ya recursion par laao aisi hi.
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Or episodes dal diye
@ayushop1921
@ayushop1921 2 жыл бұрын
@@mohammadfraz kha bhaiya apne 30 bola tha 25 hi hai
@TOUR__OF__UNIVERSE
@TOUR__OF__UNIVERSE Жыл бұрын
​@@mohammadfrazbhai ka mein c++ ke saare functions seekh kar software engineer ban sakta hoon? Please bataiye.
@d.aditya1398
@d.aditya1398 Жыл бұрын
dsa imp h@@TOUR__OF__UNIVERSE
@ashyy346
@ashyy346 Жыл бұрын
Best explanation ever, thanks a lot sir!
@vibhaypandey9650
@vibhaypandey9650 2 жыл бұрын
Amazing series man and explanation is very much understandable and hats off your hardwork
@adityavaste8963
@adityavaste8963 Жыл бұрын
Thanks for wonderful playlist. ( It took 2 hours )
@aditiranjan303
@aditiranjan303 2 жыл бұрын
Your explanation is too good.. pls make such series for other topics too...
@ujjwaltiwari6166
@ujjwaltiwari6166 3 жыл бұрын
Acche se rivision ho raha bhaiya , thanku bhaiya
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Keep watching and sharing
@googleit2490
@googleit2490 Жыл бұрын
Understood :) Oct'4, 2023 04:22 pm
@jay8118
@jay8118 2 жыл бұрын
New to the channel...Explanation is great..Please continue making more
@omchaudhari3576
@omchaudhari3576 2 жыл бұрын
Nice Explanation ☺️. I think we can also use vector instead of Linked List...
@79rajeevsharma42
@79rajeevsharma42 2 жыл бұрын
Pehle ke sare lectures to samjh aaye hai achhe se, but ye wala bahut confusing tha, same video, c programming pe bana dijiye
@crushtech1362
@crushtech1362 Жыл бұрын
In a Day reach here, day yet not end
@stite1191
@stite1191 Жыл бұрын
It took me 3 hours as I was doing questions in java and cpp both.
@shyaamaltripathi5373
@shyaamaltripathi5373 3 жыл бұрын
Bhaiyya the series is really good ! keep going
@anchalchaturvedi773
@anchalchaturvedi773 3 жыл бұрын
Loving this series bhaiya 👍👍
@ss-md4qn
@ss-md4qn 2 жыл бұрын
Superb ,thanks
@dp-ev5me
@dp-ev5me 3 жыл бұрын
Sir thumbnail me bohot achhe lag rahe ho. Thank you for the guidance.
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Are thank you so much
@khushboosaraf2375
@khushboosaraf2375 2 жыл бұрын
Thank you for the videos.
@satyamjaiswal1222
@satyamjaiswal1222 3 жыл бұрын
In the worst case for search operation, it will take O(n) time. I think we can do search operation in O(L) time by trie where L is total digits in that number.
@darkelixir2517
@darkelixir2517 2 жыл бұрын
But using trie will complicate things, cuz most of us here learning LL
@vxbsjisjjdjjdn
@vxbsjisjjdjjdn 2 жыл бұрын
dear fraz bhaiya please add please add sub-titles for linked list playlist. And congratulations for cracking the google.
@vasuarora8775
@vasuarora8775 3 жыл бұрын
mast series bhaiya 💙💙💙💙💙💙
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Thanks Vasu
@mycam9364
@mycam9364 10 ай бұрын
In java we can use boolean array instead of using vector right.
@ratnasanjay
@ratnasanjay 2 жыл бұрын
Thankyou bhaiya for this video
@shyamaharihar2425
@shyamaharihar2425 2 жыл бұрын
Nice explanation
@suryaprakash1890
@suryaprakash1890 2 жыл бұрын
Just 2 days to reach here!!🖐️💗
@NITianMonika
@NITianMonika Жыл бұрын
aaram aaram se dekha hai 3rd day hai aaj🙂🙂🥲
@Ayush-jz5um
@Ayush-jz5um Жыл бұрын
How will we check if hashset is empty or not? Can i say if even a single element of vector is 1 then hashset is not empty?
@dishagupta7446
@dishagupta7446 4 ай бұрын
one que hashset is supposed to have O(1) time complexity. Doesn't 2nd approach makes it O(N)
@vivekpanchaal
@vivekpanchaal 2 жыл бұрын
1 din lga lec8 per aane ke liye
@vaibhavtale318
@vaibhavtale318 2 жыл бұрын
thank you soo much ..
@shwetanshusood9450
@shwetanshusood9450 Жыл бұрын
Got into 8th episode in 1 hour
@kunalyewale7495
@kunalyewale7495 2 жыл бұрын
episode 8 done
@kunalyewale7495
@kunalyewale7495 2 жыл бұрын
nice
@tanmaythaker2905
@tanmaythaker2905 3 жыл бұрын
Sir loving your content! 50K soon!
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Hope so! will provide quality content ❤️🔥
@saurabhnayak3352
@saurabhnayak3352 3 жыл бұрын
@@mohammadfraz yes soon.
@mohammadrobass
@mohammadrobass 10 ай бұрын
If you search for a key that is at the end of the list, the 'contain' function should return true, but currently, it returns false.
@christlikelife6675
@christlikelife6675 2 жыл бұрын
Will there be any change in the efficiency of code if I use a 2D vector instead of a linked list??
@nilayarya7634
@nilayarya7634 2 жыл бұрын
no
@ritikgoyal3622
@ritikgoyal3622 3 жыл бұрын
Great 👍 job bhaiya
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Thanks bro
@mdnadeem6343
@mdnadeem6343 3 жыл бұрын
musch needed video thanks bhaiya
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Welcome bro , please share also
@sudhanshuranjan4392
@sudhanshuranjan4392 2 жыл бұрын
And even if our hash function is good still there is a chance of collision. Suppose we have 10000 elements and only 1, 13 and 11 collides and we try to search for 11 it will take O(n) time. So when we say that hash set takes constant time does it means that we are talking about average time??
@hanuuhanooo7111
@hanuuhanooo7111 3 жыл бұрын
Good content keep uploading
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Haan bilkul , keep supporting
@stite1191
@stite1191 Жыл бұрын
Can you make a 5 to 10 min video submitting it in java. explaining the implementation part.
@shouvikdatta6831
@shouvikdatta6831 2 жыл бұрын
Can you mention the time and space complexity of add, remove and contains function while chaining..?
@AB-tp9eg
@AB-tp9eg 2 жыл бұрын
Sir, What is the time complexity & space complexity?
@yash-h9e
@yash-h9e Жыл бұрын
1 - 2 dinnn bhiyea lag gya
@harshityadav14354
@harshityadav14354 2 жыл бұрын
one day
@simranarora2817
@simranarora2817 2 жыл бұрын
you explanation is too good, and you are too humble. But I wish you could have made this in java
@mohammadfraz
@mohammadfraz 2 жыл бұрын
Thank you. Visit my website leadcoding.in for Java Codes of my lectures.
@sachinkhubchandani5703
@sachinkhubchandani5703 2 жыл бұрын
Can we handle the maximum recursion depth using this technique? I got a question where I had to run the recursive function around 50K times
@RahulSharma-ip3pc
@RahulSharma-ip3pc 2 жыл бұрын
1 hour m ho gya 8th lecture tk
@sagestudy
@sagestudy Жыл бұрын
This is very complicated...
@RAHUDAS
@RAHUDAS Жыл бұрын
What is Diff between Set and hashset.
@bharathkumar5870
@bharathkumar5870 3 жыл бұрын
#roadto25k
@mohammadfraz
@mohammadfraz 3 жыл бұрын
❤️
@vinitranjan2665
@vinitranjan2665 Жыл бұрын
class MyHashSet { public: int n=10e6+1; vector v; v.resize(n); MyHashSet() { } void add(int key) { v[key]=1; } void remove(int key) { v[key]=0; } bool contains(int key) { return v[key]; } }; Bhaiya v.resize(n) agr upr likh rhe to to error kyu de rha hi?
@MayankSharma-vi1ok
@MayankSharma-vi1ok Жыл бұрын
Uper likhne ka matlab h ki tumne abhi vector initialize nhi kiya h aur resize ka function use kar rahe ho so Error aayega.
@akshyagarg2398
@akshyagarg2398 3 жыл бұрын
Instead of using linked list we can take binary search tree which will make logn time
@mohammadfraz
@mohammadfraz 3 жыл бұрын
No , that's not hashset Hashset works on O(1)
@akshyagarg2398
@akshyagarg2398 3 жыл бұрын
@@mohammadfraz but searching time will reduce na? the find function you used take o(n) time
@mohammadfraz
@mohammadfraz 3 жыл бұрын
@@akshyagarg2398 no bro , it takes O(1) if we use a good hash function
@akshyagarg2398
@akshyagarg2398 3 жыл бұрын
bhaiya waiting for your reply and if possible can you please paste the code here ?
@akshyagarg2398
@akshyagarg2398 3 жыл бұрын
@@mohammadfraz okay okay I got your point. Hash function will distribute the numbers tsuch that finding them would be easier. Thanks bhaiya
@nitansshujain811
@nitansshujain811 2 жыл бұрын
Sir, please update your description. You are no longer working at Curefit :)
@aggarwalsachin4854
@aggarwalsachin4854 Жыл бұрын
second day and this episode
@SunnyGupta00
@SunnyGupta00 3 жыл бұрын
Reach++
@syednadiya69
@syednadiya69 2 жыл бұрын
Reached
@manishkumarmahato2481
@manishkumarmahato2481 2 жыл бұрын
Unordered set
@gautamkhatri7895
@gautamkhatri7895 Жыл бұрын
@gokulbhaveshjoshi
@gokulbhaveshjoshi 2 жыл бұрын
it took approx 1.5 hour to each ep8
@50_kamalnarayanchaubey37
@50_kamalnarayanchaubey37 Жыл бұрын
within 5 hours, along with 1.5 hrs break in between
@kartikeysingh8480
@kartikeysingh8480 2 жыл бұрын
0:15 Mujhe 2 ghante lage bhaiya ep.8 me aane me
@atharvakulkarni2024
@atharvakulkarni2024 3 жыл бұрын
time complexity??????????????of all the operations?
@desihiphop4998
@desihiphop4998 3 жыл бұрын
bhaiya java ki linked list mein contains ka already ek pre defined method hai use use kr skte hain ??? class MyHashSet { LinkedList[] set; public MyHashSet() { set = new LinkedList[11]; } public int func(int key) { return key%11; } public void add(int key) { int i = func(key); if(set[i]==null) { set[i]= new LinkedList(); set[i].add(key); } else if(!set[i].contains(key)) set[i].add(key); } public void remove(int key) { int i = func(key); if(set[i]!=null && set[i].contains(key)) set[i].remove((Object)key); } public boolean contains(int key) { int i = func(key); if(set[i]!=null && set[i].contains(key)) return true; return false; } }
@shivam4you744
@shivam4you744 2 жыл бұрын
2nd day : )
@gengar_13
@gengar_13 3 жыл бұрын
search wala jo function h wo waise list :: iterator search (int key ) kyu banana para why not int search ? plz samjha do
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Vo Iterator return karraha hai islie. List :: Iterator is the return type of search function
@SunnyGupta00
@SunnyGupta00 3 жыл бұрын
It took me 2hrs
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Keep moving
@myyoutubeisthis
@myyoutubeisthis Жыл бұрын
To reach 8th episode mujhe 2-3 din lage.
@deepakkumarverma6282
@deepakkumarverma6282 3 жыл бұрын
Bhaiya what if the input is a negative number?
@samartheory
@samartheory 2 жыл бұрын
damn this guy knows his stuff!
@saadhya98
@saadhya98 2 жыл бұрын
2days because I was busy in work
@ananya8740
@ananya8740 3 жыл бұрын
but what if jo keys add krni hai unka modulo maximum time koi bhi ek particular number hi aa rha lets say hame 1, 11 ,21,31............... keys mil rhi h and hmne size 10 lia hua hai then hmesha kisi bhi key ko access krne ke lie O(n) time lgega na ?? i am very confused with the time complexity . please help me there
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Yaha pe hamara hash function kaam aata hai , hash function agar accha ho to ye jo aapne mention kiya hai , esa kabhi nahi hoga. Evenly spread honge numbers.
@ananya8740
@ananya8740 3 жыл бұрын
@@mohammadfraz okay thankyou sir and just one more thing , can you please add time complexity at last because that is bit confusing in some cases
@adarshsharadpandey4763
@adarshsharadpandey4763 2 жыл бұрын
Approx 1.5 hour to reach here...
@rajkuhar3234
@rajkuhar3234 2 жыл бұрын
reached in 1 hour at 1.5
@asjadahmad1360
@asjadahmad1360 2 жыл бұрын
it took me 2 hours
@RajPatel-ev5vz
@RajPatel-ev5vz 2 жыл бұрын
bro,i tried to submit this question with same code but it keep showing some errors in leetcode, eg. when I use size = 100/1000 it shows deadsignal error and for size =10000 it shows runtime error,can you explain why? It runs correctly for size=1e6+1.
@sunilkumar-ft3nk
@sunilkumar-ft3nk 2 жыл бұрын
why 1e6 does not work ? and why 1e6+1 work?? can you please answer this
@ronaldpatrick5108
@ronaldpatrick5108 2 жыл бұрын
@@sunilkumar-ft3nk Because 1e6 only covers 0 to 1e6 - 1, We need 1e6 too
Design HashMap | EP 9
19:10
Fraz
Рет қаралды 26 М.
Reverse Linked List | EP 10
22:27
Fraz
Рет қаралды 36 М.
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 9 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 138 МЛН
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 13 МЛН
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 853 М.
Why MOST Developer Portfolios are Worthless
12:50
Travis Media
Рет қаралды 18 М.
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Рет қаралды 654 М.
Merge Two Sorted Lists | EP 13
20:16
Fraz
Рет қаралды 27 М.
LRU cache | EP 22
19:51
Fraz
Рет қаралды 24 М.
Easy Google Coding Interview With Ben Awad
28:00
Clément Mihailescu
Рет қаралды 1 МЛН
you will never ask about pointers again after watching this video
8:03
10 years of coding in 13 minutes
13:28
Joma Tech
Рет қаралды 4,9 МЛН
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 9 МЛН