Complete C++ STL in 1 Video | Time Complexity and Notes
Complete Notes: takeuforward.org/c/c-stl-tuto...
Check Coding Ninjas Out for 20% Discount: bit.ly/3GMlV7Z
Notes: takeuforward.org/c/c-stl-tuto...
LowerBound and UpperBound Video: • Binary Search with C++...
Check out our Website for curated resources:
Our Second Channel: / @striver_79
In case you are thinking to buy courses, please check below:
Link to get a 20% additional Discount at Coding Ninjas: bit.ly/3wE5aHx
Code "takeuforward" for 20% off on sys-design: get.interviewready.io?_aff=takeuforward
Crypto, I use the Wazirx app: wazirx.com/invite/xexnpc4u
Take 750 rs free Amazon Stock from me: indmoney.onelink.me/RmHC/idje...
Earn 100 rs by making a Grow Account for investing: app.groww.in/v3cO/8hu879t0
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
----------------------------------------------------------------------------------------------------------------------------------------------------
Пікірлер: 1 600
Check Coding Ninjas Out: bit.ly/3GMlV7Z
@biswajitadhikary_0807
2 жыл бұрын
i am a 2nd year cse student i want to follow your series but i am unable to decide from where i should start. i know c , now i am learing c++. please reply me
@pavankumar-cz9hb
Жыл бұрын
@@biswajitadhikary_0807 start coding basic problems in c++
@kumarisushma4797
Жыл бұрын
sde sheet not found???
@prithammahato1915
Жыл бұрын
UNDERSTOOD_BHIYA :)
@72nishantwadhawan5
Жыл бұрын
@@kumarisushma4797 🤣🤣
Bhaiya, coming from a middle-class family with mediocre teachers, I have always thought I would never get placed due to the fact that I could not afford courses and the difficulty of problem-solving. All of us are blessed to have you as a savior. Thank you very much. I am part of the 2020-2024 batch, and my placements will begin in July. As a result of discovering your channel and starting to prepare, my hopes have been revived. You will make a huge difference in my life if I get a job and can provide for my family.
@amanpaliwal3122
Жыл бұрын
which clg do you have study ??
@aqs.a
Жыл бұрын
You will!! Good Luck :)
@amanpaliwal3122
Жыл бұрын
@@aqs.a you also
@arc420
Жыл бұрын
Bhay hua kya ?
@nostalgiccringeallhailchel3881
Жыл бұрын
@@arc420 same question
Chapters: 00:01:02 Libraries 00:01:51 namespace std 00:02:40 Functions 00:05:08 STL 00:05:40 pair 00:10:04 vectors ( 1st container ) 00:15:25 accessing elements in vector 00:19:28 iterators 00:24:43 deletion in a vector 00:27:00 insertion in a vector 00:29:46 other functions in vector 00:30:26 list ( 2nd container ) 00:31:43 Deque ( 3rd container ) 00:32:02 Stack (LIFO) ( 4th container ) 00:34:16 Time Complexity of stack operations 00:34:27 Queue (FIFO) ( 5th container ) 00:35:58 Priority Queue ( 6th container ) 00:38:28 Time Complexity of push, pop & top 00:38:50 Set ( 7th container ) 00:42:58 Lower bound & Upper bound 00:43:40 Multiset ( 8th container ) 00:45:35 Unordered set ( 9th container ) 00:47:12 Map ( 10th container ) 00:53:22 Multimap ( 11th container ) 00:53:46 Unordered map ( 12th container ) 00:54:53 Algorithms - Sort 00:59:18 Comp (For sorting) 01:03:26 builtin_popcount( ) 01:04:18 next_permutation 01:06:21 max_element 01:06:40 min_element 01:07:09 SUBSCRIBE !!!
@yagniktalaviya2146
Жыл бұрын
Thankyou man!
@khushvantkumar1670
Жыл бұрын
thanks bhai✌
@sujayshanbhag2055
Жыл бұрын
Thankyou so much!!
@lalitkumarsharma2003
Жыл бұрын
@@yagniktalaviya2146 😄😄
@lalitkumarsharma2003
Жыл бұрын
@@khushvantkumar1670
I am a first year student in my first Sem, And i am glad that I have found This channel in my early stage of college life. I am going to stick to this Man till my first interview. and also even after that. Thanks for explaining every thing in detail and clearly. I don't see my college professor even near to this guy when it comes to explaining concepts.
@rgamma7468
3 ай бұрын
You are very lucky, just keep seeing these videos and practicing!
Gaining such a substantial amount of knowledge with clear examples in just one hour is simply amazing. Thank you!
Great Video!! Just one correction at 31:19 the underlying data structure of the vector is not a singly linked list its a dynamic array
@vigneshwarm
2 жыл бұрын
This needs more upvotes. I've always thought vector is a linked list
@princerajput6709
Жыл бұрын
@take U forward can u please explain???
@AyushKumar-gf5th
Жыл бұрын
@@vigneshwarm really?
@vigneshwarm
Жыл бұрын
@@AyushKumar-gf5th cut me some slack. Vector does seem to do things that linked list can. After you create a list, you are allowed to add or delete things. C++ can overload the [] operator, so i assumed when you do arr[i], it does traverse until i and get the data for you. But yeah, I'm at fault, considering how everyone interchangeably uses array and vector, i should have guessed vector is prob dynamic array and not linked list. (O(n) time for every time you do arr[i] is painful) My bad
@ashish9948
Жыл бұрын
@@vigneshwarm So what's the correct answer ?
At 24:06 " for(auto it:v) ", don't get confused " it " with iterators. " It " is not an iterator, it represents each element of vector v. We could write it like " for(auto element:v) " and it would run perfectly.
@prafullaraichurkar4369
4 ай бұрын
Thanks!!
@hardikpahuja8381
4 ай бұрын
Thanks was thinking about that only.
@Abhishek-vc5bp
2 ай бұрын
what's v represent here { for(auto element : v) }
@webhelpbyvarghab
2 ай бұрын
@@Abhishek-vc5bp V is just a name for the vector(dynamic arrays in c++)
1 hour of a fully packed informationed STL video. Thanks Striver for the level of content you always provide.
This is the most complete video on STL no cap , I had seen many STL videos before but this guy covered each and everything in detail and that too in so simple words and ways .
This is the most complete video on STL no cap , I had seen many STL videos before but this guy covered each and everything in detail and that too in so simple words and ways . Striver u are really the bestt!! Please continue this seriess waiting for your new videos everyday.
@InvinciRD
Ай бұрын
Are any important topics or use cases missing here? And where can u watch them?
It's been a great honor while studying on this platform. I have understood all these things. Very thankful for the teachings.
getting this much bulk of knowledge with proper examples in just 1 hr is jst incredible. Thankyou!
this is my first time going through this channel and STL never seemed this easy. Thankyou
Even though I've already seen that 45 minutes stl video on TUF and stl series on code-beyond, I'm still going to watch this one. ✌
@amitrameshjaisinghaniofficial
2 жыл бұрын
True same !!
@ShivaShiva-py9zt
2 жыл бұрын
True
@bhrigumonibaruah251
2 жыл бұрын
which one should I prefer as a beginner?
@amitrameshjaisinghaniofficial
2 жыл бұрын
@@bhrigumonibaruah251 this one but after then revise for around 3-4 days then it will in heart
@bhrigumonibaruah251
2 жыл бұрын
@@amitrameshjaisinghaniofficial thanks for your suggestion 🤞
0:00 Basic Structure of C++ 5:05 STL components 5:36 Pair: Tuple in C++ 7:15 Nested Pair 9:05 Pair Array 10:04 Vectors 16:19 Iterator 30:25 List 31:44 Deque 32:04 Stack 34:29 Queue 36:00 Priority Queue 38:53 Set 43:53 Multiset 45:37 Unordered set 47:12 Map 53:22 Multimap 53:46 Unordered map 54:53 Algorithms 59:17 Comp (For custom sorting inside sort) 01:03:26 __builtin_popcount( ) 01:04:18 next_permutation 01:06:21 max_element 01:06:40 min_element
Man! I loved this crisp way of learning all STLs in only 1 video that too so fast :)
Simply amazing, i have an interview two days later. Love your way of explaining.
This is literally the best video for learning C++ STL. Thanks Striver :)
This is the best youtube video I've come across. Productive one hour.
Thank You Striver ! Wanted to learn STL from a long time but couldn't complete due to the lengthiness of courses available. You gave us the precise idea of stuff that is actually necessary for regular use, Thank YOU !
This was my first time learning STL, and bingo ! That was very easy, idk if someone else would have taught like this. Day 5 of Striver A2Z DSA Course Completed ✅
Your teaching style is superb. 👌 I've been following your videos since a few weeks and I'm learning dsa on my own pace. Thanks a lot for all your videos. Keep helping juniors. Thanks a lot!
Has everything that's required and yet explained in such a clear and structured manner! Amazing video sir 👍👍
ITs been a long time approx 4 years since I started my career in software development. Started again with dsa to upgrade my self. Thank you Striver.
was preparing for an interview and this video helped me allot, liked they way you simplify things and explain
Awesome !! Just awesome .. 1 hour video but so packed and curated it took me around 5 hrs to do(i took heavy notes) !!
@akhilgupta4997
Жыл бұрын
can you share notes please
@morhadi
9 ай бұрын
@@akhilgupta4997 +1
@rgamma7468
3 ай бұрын
Yea, i am doing this since afternoon and its 11 at the night. I took long breaks in between though.
@Asur.....
Ай бұрын
Bro I'm facing 404 error while opening the notes uploaded by striver sir ,so can u send me notes
@Narrator_
19 күн бұрын
bro can i get your notes
Thank you Striver, you’re one of the best teachers I ever had.
Thanks, Striver. I just completed this STL and in the last section of algorithms, I found the solution to the problems I got struck into while solving 43 questions in Leetcode. Looking forward to complete this amazing playlist..
Thank you, Striver! for explaining the C++ STL in a clear-cut way. It helps me to learn C++ STL quickly.
Already watched your previous STL video and this one is awesome 😌(cherry on the top of it :) Best part is how well you've explained comparator implementation👍
you are the best of all whoever are in the same content creation. mark my words- what differentiates you is the way you friendly communicate, simplicity in your language. keep up the good work
Honestly this is the best video on STL, please keep up the good work. KUDOS.
thanks a lot ..really helpful .this 1 hr course of stl was just the best stl video i came across till now 👏👏
Thank you for explaining in such easy and concise way! 🙏
Thank you for the video , you taught me most of the concepts in a simple way !
this was the most compact , usefull c++ stl video I have ever watched.😭😭
Very clear explanation! Thank you! Really the best resource for those who wants to start learning the STL in C++.
This is indeed a complete STL package. Thanks a lot❤
Covered every STL topic in an organised way!!
thank u so much striver, the best ever explanation i could get all at 1 spot and 1 shot! u really made me believe tht i shldnt give up on DSA as i just didnt find the right person to study from, i know its a little late for me to go through this video just before the day of my interview to revise, but its never to late i hope
You're just amazing... I just don't have words; very clear, precise, apt, concise, from the scratch explanation.♥Thank you very much STRIVER bhaiya.
This is a great summarized STL video, really helpful for beginners as well as advanced folks (it's like a mini revision for y'all)
@jacobblack2544
10 ай бұрын
Who asked?
Excellent tour arrangement of the STL in a single video
Amazing !! Just amazing. Such concise and coherent way of explaining everything.
Bhaiya Just a small correction at 45:00 you wrote ms.find(1) + 2 in the end part of the erase() function. But this will give us an error because only array, vector, and string can store elements in contiguous memory locations, so we can't do +2 and access the element after the first occurrence of 1. Here is the corrected code for that part: auto it = ms.find(1); advance(it, 2); /* Now the iterator is one position ahead of where you want it to be. This is because in the erase() function it takes from the start till one element less than the end that we specified.*/ ms.erase(ms.find(1), it); // Now we have the iterator in the correct place so it will erase properly and we will be left with only one 1.
@priyanshugupta5192
Жыл бұрын
thanks bro
@roxy2925
Жыл бұрын
thanks bro
@bihanbanerjee
Жыл бұрын
We can do ```ms.erase(ms.find(3), next(ms.find(3), 2));``` also.
@shiv.shankar
Жыл бұрын
@@bihanbanerjee Ya next() and advance() are pretty similar.
@shiv.shankar
Жыл бұрын
@@bihanbanerjee Thank you for showing alternate code
he is so good at teaching🔥 , I was following some other youtuber but still I was not able to solve dsa problems but then my friend told about striver.. this guy helped me allot.. 💯 he is better than most of the other youtuber , keep posting such videos in future bro and thank you so much for this playlist😇
Soo grateful for such videos at free of cost ...
Best video on STL I have ever found. Thanks a lot. 🙏🏼
Greatest Stl video one could ever create. Each and every point is covered with great detailing
at 50:00 you dont have to put curly brackets for maps when using emplace function, only for insert function
Good lecture covering all the things in STL which are required with excellent explanation and within a precise time 👏.
I have more and more confidence to place a top most company , you are changing my life brighter thank you very much ❤❤❤❤❤👏👏👏
00:01 STL in C++ provides pre-defined containers and algorithms for efficient coding. 02:04 Using namespace std simplifies code by avoiding repetitive std:: prefix 06:07 Pair data type in C++ can store different data types and nested pairs. 08:06 Understanding pairs and accessing elements in a pair array 12:25 Understanding vector initialization and insertion methods in C++ 14:32 Vectors in C++ can be resized dynamically 18:33 Understanding memory shifting with iterators in C++ 20:26 Understanding reverse and reverse end in C++ STL 23:54 Using auto to automatically assign data type to vector elements 25:48 Deleting elements and inserting at specific positions in C++ STL vectors 29:34 Key functions in vector and list containers 31:22 List, deque, and stack containers in C++ STL 35:15 Understanding operations of a priority queue 37:07 Priority queues are not maintained as linear data structures, they use a tree structure. 40:55 STL set operations: find, erase, and counting 42:49 Sets in C++ have lower and upper bounds and operate in logarithmic time complexity. 46:44 Understanding the working of unordered set and map container in C++ STL 48:33 Map in C++ STL can store key-value pairs of any data type 52:27 Understanding iterators and accessing values in C++ map 54:20 Learn important STL algorithms for sorting efficiently. 57:57 Sorting based on second element and then first in descending order 59:50 Understanding the pair comparison in sorting 1:03:34 Built-in popcount function in C++ 1:05:23 Printing all permutations of a sorted string
If you reading this then i just want to let you know that you are awesome you are truly truly awesome 😎 , like totally fire it's not about getting placement or high paying it's about enjoying the journey of learning with you and it's truly amazing 🤩. Keep doing dude , you will achieve more 😃.
@jyothikamalesh7586
Жыл бұрын
Heyy,Thats a good message to read Keep impacting the same... I like the good vibe going😁💫💫
There is Great scope of learning in your videos brother !, Complete Imp STL in one Go!. Thank you so much.
Today I just learnt the STL part of C++. Thanks Raj dada!! 💌
As u already covered a lot of videos on interview related preparation....i guess now you can upload some CP related stuff like number theory, combinatorics, etc etc... 🤗💕
@imshivendra
2 жыл бұрын
Do Product Based Comapany also ask CP ? I don't think so.
@itz_me_imraan02
2 жыл бұрын
@@imshivendra I heard few top product based companies prefer CP....
Short and crisp lecture on STL in C++. It helped me a lot.Thanks for this Video : )
The first long duration video I can see without any skips Awesome video sir !..
Short and simple, memorable way of presentation, refined information. Thanks Raj. Most Important 😉 ✅ Understood
Grateful for the lessons,Have been studying it for a day And have the digital notes Am totally grateful and feeling blessed that i can start with dsa problems now in c++ Keep teaching to your heart's content man 😁❤️❤️ Love
@btb_22
9 ай бұрын
can you share the notes please?
thank you! speed running videos before my exam... i thank god that i discovered you channel and this video!!
He is the best for leaning any language i was facing so many issues earlier but after watching this video i have no doubts about stl at all thank you so much striver
Amazing video once again striver, appreciate it. Can you work on something similar in JAVA, it would be useful for someone that's been out of touch for a while. Thanks
Hi Bro, need one help. I am currently working on implementing sorting on localized strings(For different languages such as Japanese, Chinese, Spanish) in C++. ASCII based comparison won't work for Non-US strings. In order to make sorting works for all languages, i got collate.compare function which overload How to verify sorting works properly or not? Eg., Japanese is following different sorting strategy and they have four different scripts and each has different sorting order. How could non- japanese speaker validate the sorting order? Looking for some validators open source or logic to validate sorting logic in Non-US languages. Please share me if you have some reference. Thanks
very short concise and beautifully explained for intermediates and beginners!
The way he explains everything is very good.thanks bro for this. This is very helpful for us.
Java Collections please !!
Hey Striver, I can solve most of the problems but could not calculate time complexity properly. And also there is no any time and space complexity-related videos in your channel. so can you please make a time and space complexity videos in depth just like recursion ::). Love from Nepal.
@gunahawk6893
2 жыл бұрын
Check uncode gate serious might help
This is a very good overview to the STL concepts for a beginner!
every time im stuck you are there thank you very much in debt for this channel
At 43:30, you mentioned that all operations on sets take O(log(N)), but on line 383 you've mentioned that erase operation takes O(1) if given an iterator
@creepopsub2936
Жыл бұрын
special case hai i guess. btw at 23:10 vector::iterator it1= v.rbegin(); vector::iterator it2= v.rend(); working?? I GOT THIS ERROR. PLZ HELP BRO error: conversion from 'std::vector::reverse_iterator' {aka 'std::reverse_iterator'} to non-scalar type 'std::vector::iterator' requested pta nhi this doesnt rums😅😅
@aarfeenanees9147
Жыл бұрын
@@creepopsub2936 iterators are of different type. the rend() member function returns an iterator of type std::vector::reverse_iterator, which gives an error when you try to store in a variable it2 of type std::vector::iterator. Just simply write std::vector::reverse_iterator its2 = v.rend() instead an it will work. As iterators come in varieties (std::vector::cont_iterator to name one), It becomes tedious and an error-prone way to always explicitly define iterator type when declaring a variable. So I'd advice you to use auto keyword instead. It saves you from writing verbose iterator type-names and prevents errors from creeping into your code.
@creepopsub2936
Жыл бұрын
@@aarfeenanees9147 Thank u so much bro! Literally i asked thousands of people about this and no one could teach me this. I didn't even get this on stack overflow etc. Thank u so much buddy! It really meant alot. Are You On LinkedIn??
@creepopsub2936
Жыл бұрын
@@aarfeenanees9147 I would surely love to connect with you. Thank you so much yar.
@aarfeenanees9147
Жыл бұрын
@@creepopsub2936 I'm not on LinkedIn yet, but will create an account once I start College.
Bhiaya pls make one video about collection framework video for java users
@takeUforward
2 жыл бұрын
Soon!
@abhinandansingh1922
2 жыл бұрын
@@takeUforward looking forward to it 🔥
What a video sir !! Really hats off to your hardwork. The way you teach is simply amazing. Keep going, keep growing.
Learned some great things easily. Thanks Striver!
Hey I am new to this channel so I started exploring but I think the playlist is not arranged well so I've a few doubts has he covered everything in c++ like pointers structure etc or do I need to cover basic c++ before to continue with this playlist?
@Vipul_775
5 ай бұрын
First learn the basics of c++ then start from striver A2Z dsa sheet not directly youtube videos but start sheet questions of striver 455 questions bcz they all are arranged in well mannered [ east to hard]😊
@PiyushMishra-tq6cl
5 ай бұрын
@@Vipul_775 Thanks bro but from where should I cover basic c++?
@Vipul_775
5 ай бұрын
@@PiyushMishra-tq6cl if u can buy paid udemy course of 500rs. Then u can buy abdul bari c++ course which is very good course on c++ and if u want free course then follow code with harry playlist
@Vipul_775
5 ай бұрын
@@PiyushMishra-tq6cl code with harry
@PiyushMishra-tq6cl
5 ай бұрын
Hey I saw his azsheet but In the heap learning section there was no video
00:11:00 can't we resize array like this int size; cin>>size; int array[size];
@GOJOANDSUKUNAFAN
4 ай бұрын
Yes you can
@pushprajsingh6891
2 ай бұрын
but its not recommended to do so ...i dont remember the exact reason by now
@GOJOANDSUKUNAFAN
2 ай бұрын
@@pushprajsingh6891 the reason is basic we don't use it cause it's a bad thing bt no in soon videos of Striver he is literally doing this so it dosent really matter
I am new to this channel and folloing the A2Z DSA course sheet and I am really liking the way of explanation and the quality of the content is also too good. Thank you for this brother. thank you.. Striver
Best content on KZread 🔥. Inspiration for many, hat's off to you man ❤
Why another video on this?? Ur previous STL video was already the best 💥
@takeUforward
2 жыл бұрын
Quality! 😅 That video was no more recommended by youtube because of its low production quality, so just wanted to start the DSA course fresh with top-notch quality, so that people don't drop at first.
@chakrabarti9634
2 жыл бұрын
@@takeUforward Dada will you going to teach entire DSA in upcoming months? Your reply can make my day brother❤️❤️
@takeUforward
2 жыл бұрын
Yes
@chakrabarti9634
2 жыл бұрын
@@takeUforward this filled me with immense joy❤️❤️ thanks you so much dada onek valo theko
Great Lecture BHAIYAA 🔥 But @31:20 you said Vector is implemented using singly linked list. If that is so then how are we able to acces elements of vector using index? 😅 If someone knows anything please correct me.
@rajithramakurthi7732
2 жыл бұрын
+1 same doubt
@30saransh
2 жыл бұрын
`I guess he meant to say that about list.
@vigneshwarm
2 жыл бұрын
You can Overlord the [] operator in c++.
@ketanlalcheta4558
2 жыл бұрын
It's not implemented using list.... If it is , we will not get advantage of the contiguous memory allocation provides... It's mostly implemented using fixed size array and when size reaches to capacity , new fixed size array is allocated which is almost 1.5 to 2 (compiler implementation dependent) of original size , copies original content to new location of having higher size and releases memory of earlier allocation
@nayankumarbarwa4317
Жыл бұрын
@@ketanlalcheta4558 yup it uses calloc for internal operations
keep uploading videos thats the only thing that keeps me motivated for programmming cheers!
You're a amazing person because you have a tremendous amount of energy in speaking and thankyou for being a rope for use to climb the mountain of DSA....🙌🙌
Great video for beginners, Love the way you teach, Thank You for your content.
a really great video can see how your cp experience is used for real-life use in stl.
@striver your Teaching skills were extremely impressive and engaging it was so helpful for all the programming lovers and thanks for providing all the content free
i just felt excited by seeing this particular video, i have completed dsa in c from my college and i used the regular sorting methods but with this stl functions ,I felt so happy😉🙂
Whaat A Video !!!! Understood Everything! Loved it
thank u so much for such a wonderful and informative video :) u are great !!
best STL video ever existed on youtube !! . Thank you so much bhaiya.
Proud Of You Brother Of what U have achieved So Far!
Superb video sir, You have covered everything about STL in a single video with notes too.. and simple explaination.. I just loved the way you explained with all examples..Thankyou for this video.
49:56 There is a syntax error in mpp.emplace({3,1}). Instead of that mpp.emplace(3,1); , you taught it previously in the video. Btw thanks for the most complete and amazing lecture on STL available on youtube Striver !!❤
Great Piece of Art, Truly Grateful! Best Quality Content Ever.
One of the best explanation video. Thank you Striever!♥
this one videoo, you just gained one more subscriber, very nice video didnt feel 1 hr long thanks man
Thank you so much. Just completed STL before my interview.
excellent session , i never heard this type of explanation about stl -containers , thank you so much for your time
Thank you so much Striver, this helped me a lot.
bro a live saver video, please keep going.