Find Second Largest Element in Array | Remove duplicates from Sorted Array | Arrays Intro Video
Вставка
- Опубліковано 28 лип 2024
- Notes/C++/Java/Python codes in Step 3.1 of bit.ly/tufA2ZYt
Largest Element: takeuforward.org/data-structu...
Second Largest: takeuforward.org/data-structu...
Check if Sorted: takeuforward.org/data-structu...
Remove Duplicates: takeuforward.org/data-structu...
Practice Link:
Largest Element: bit.ly/3CuLIR3
Second Largest: bit.ly/3GJie4l
Check if Sorted: bit.ly/3XsgYIH
Remove duplicates: bit.ly/3if2k8G
Full Course: bit.ly/tufA2ZYt
You can follow me across social media, all my handles are below:
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
0:00 Introduction of Course
0:54 Basics of array
6:33 Introduction of Brute, Better and Optimal Approaches
8:50 Largest element in an array
11:39 Pseudo code
12:44 Code-compiler
13:30 Second Largest element in an array
23:48 coding implementation
28:42 Check if the array is sorted
30:00 Pseudo code
30:49 Code-compiler
31:26 Remove duplicates in place from Sorted array
40:40 Pseudo code
42:12 Code-compiler
Let's march ahead, and create an unmatchable DSA course! ❤
Use the problem links in description.
I will add it, don't worry
Hey striver,
Just a small request, If is it possible then try to paste your video Clip in Right hand side in the lectures, as previous lectures.
Because it's a habit of long time to see the solution or explains in left hand side.
Just a silly request... 😂
456 a to z start kar diye h 😊
HAVE UNDERSTOOD_COMPLETELY
Hello sir, You're so much passionate about teaching. Each and every word of your video goes into my mind . Thank you sir.
started today and completed the first video very well explained! thankyou so much!
will continue the streak and will update below every video after successfully watching it!
edit: whenever someone likes this comment i get reminded!
bro where are you ?
bhag gya kya padhai kr
@bhaiookabhai kaaha tak pahuncahe dsa , mae aj start kar raha hun
GOAT respect ++ because no one can explain the TC & SC for begineers in whole youtube i saw all videos. but no one can expalin like you
I was wondering how my friends were studying so well, then I found out they were all studying from here, man.♥
You have the best way of explaining things!
You start everything from scratch and then build it up so well. ♥
The 2-pointer method is so efficient compared to brute force...and it's so short as well...loved it! Understood
can you tell me in code to find slarge why we write elseif block
@@CodewithKing360 public static int largest(int num[]) {
int max = 0;
for (int i = 0; i < num.length; i++) {
if (num[i] >= max) {
max = num[i];
}
}
return max;
}
The video was awesome and so were you with your method of teaching. Hoping that it goes ahead in same way. Thank you, keep growing and keep posting.
I loved your teaching style as well as how we can build our logic from a brute force approch to optimal approch ❤❤❤
Thank you for this fantastic and well-structured course Striver. I just started into the world of problem-solving and found it very difficult to follow along on tutorials. But after I started watching your videos my mind began to think of an approach before looking for solutions. Though I still find it challenging to write all the code by myself, I am happy that I have started making progress on the problem-solving part. Things are making sense and I am able to come up with different scenarios before actually solving the problem.
bro i am starting dsa. how is strivers for that? also apne kitna kaar liya hai
@@user-db3xz3oz6s striver is amazing, just that you have to practice a lot of questions. just watching striver videos alone will help a little, main thing is rigorous practice.
I am watching in sequence, the best explanation frrrr.. SOME ONE REMIND ME TO STUDY BY LIKING THE COMMENT
You are doing an amazing job Sir by providing such brilliant content. Thank you very much Sir.
Understood , Never thought easy problems could be solved with such optimal solutions.
At 34:28 the set can be made simply as
set st(arr, arr + n);
Superb Striver. The Removed duplicates was much thinkable but solved finally. Thankyou for such an amazin tutorial
Completed DP series... That's pure Gold..
Now watching this series to revise concepts....
Striver Bhaiya You are my inspiration 🥺🥺
Is that Dp series helpful to clear google dsa rounds??
yes, super helpful uske sath agar love babbar and interviewbit ka addditional questions laga dega to interview bhi clear ho jayega @@AppaniMadhavi
Tq for giving clarity@@saswatrath4646
@@saswatrath4646 bs dp mei ya har topic mei in dono k additional question lgao?
Just completed. It was amazing, the way you explain, hats off to you
Thank you.
It was great learning Thanks❤ Bhaiya
I have now more interested in coding after seeing your playlist , always feels motivated.
Watching this video after solving these problems. For the Remove duplicates, i did it like if array[i] < array[i++] if yes then increase the count.
I really like the way you explain.
It has been fantastic! Even as a beginner, I'm able to understand complex problems thanks to your clear explanations. Thank you for making such high-quality content!
this course your explanation is just wow ; I am regretting that this piece of gold Ive found a bit late
Understood! Super fantastic explanation as always, thank you very much!!
Great efforts, thanks for this precious course!
Thanks for the amazing explanantion, i was stuck on the duplicates question, but you made it very easy, thanks. keep going.
//(11/7/23 || 4:38 am)
Great explanation, no rocket science and maths, Thank you for such great content.
I'm enjoying now to do DSA !!!
Thanks Striver, thanks a lot.
Thank you striver for the amazing explanation 😊
Such a big thing to share your knowledge in this free platform while there r lots of paid platforms... Thanks a lot
Understood bruh
bhaiya you are just awesome! you are an insipiration for the whole student community! big shoutout yo you! continue like tha ,you make many student future bright
Understood...🔥🚀🔥 || Loving it so far. Thanks for amazing content.
your explanation feels like pure science! beautiful man
understood, and the idea of not making very long videos is superb. Long videos are scary.
thanx for ur efforts
Thankyou for giving this well structured course.
My damm god, how on earth anyone can teach so brilliantly. Sir u are such a gem.. 💎💎💎💎
this is the first time i'm studying from this channel and you're the best. I'm literally enjoying solving questions today, thankyou so much for this❤
Thank you for this video, I understood whole concept which was discussed in this video.
Thank you striver for putting so much effort into making these videos.
Thank you again :)
Great!! I tried to make an algorithm using this same methodology to find kth largest element by making and vector of size k. but i came out to be O9n^3) it seems. But really great full for your explanation.
Sir plz upload the videos as soon as possible coz we have to wait for a single video for about two weeks 🥹🥲
Yes we are going every alternate day now!
@@takeUforward thanks sir!!!
Yes sir ur videos are best for revising dsa
@@takeUforward sir please upload videos alternatively as promised becoz relaying on you completely🥺🥲
@@Lucifer-xt7un BRO HE IS PROVIDING THE BEST FREE CONTENT OF DSA AND ALSO HE IS A SOFTWARE ENGINEER AT GOOGLE SO HE HAVE TO DO HIS WORK TOO SO PLZ TRY TO UNDERSTAND HOW MUCH BUSY HE IS BUT STILL HE IS PROVIDING THE BEST CONTENT TO US
Sir you're a Legend and I have a new interest in Coding after watching your videos and practicing constantly. Thank You ❤
This course helped me a lot. Thankyou bhaiya!
Hello striver. The python code in the remove duplicates article is incorrect, as in python the set does not store the values in an ordered way. So while replacing the items in the original list, the updated list might not be sorted. What we can do to fix this is convert set into a list and sorting it, before iterating through it and updating in the original array.
Correct Implementation:
def removeDuplicate(arr, n):
res = list(set(arr))
res.sort()
i=0
for item in res:
arr[i] = item
i+=1
return len(res)
Raj, Thanks a lot for This Amazing Video about C++ Arrays
Video - 1 Completed ✅
mind blowing explaination man . thank you for this content makes more and more
Helpful in getting back on track
after a long Break
Amazing explanation !
Understood! Thanks a lot striver for this amazing content. Love from Kolkata
great! understood very well
I am on the who found this channel very late but der aaye durust aaye.These topics are crystal clear in my mind after watching this video
Thanks for your effort
Thank you for such a wonderful content
Understood bhai
Remove duplicates, 2 pointer method and Rest all problems take an element of the array, run the for loop and compare that element to the current value.
Thank you Striver Bhai
very great explaination, understood sir!
Mindblowing video on arrays in c++ ;
thanks striver bhaiya for providing all these awesome materials at free of cost ;
😇
Awesome explanation striver🔥
For question - Check if array is sorted or not
Alternative way which we can write instead of writing blank IF body
boolean isSorted = true;
for(int i=1; i< n ; i ++){
if(a[i] < a[i-1]){
isSorted = false;
break;
}
}
System.out.print(isSorted);
Today I began the journey of solving problems of DSA , Thank you striver for this great series
Awesome lecture bhaiya❤
understood everything ,thank you for this amazing video
Thankyou for your efforts and knowledge for us 😊
wonderful explanation understood!!
you are doing a great job striver.
This guy will make every BUSINESS TEACHER'S business down for sure.....
Excellent Mentor till date, great conceptual briefing. Also great tips on preparation as well, Thank you, for this help the underpriviliged like me enormously. If you dont want to spend a lot and still want to Up-skill your career this is the Channel you must refer to.
understood and very much appreciated
This series is very helpful i requested to u plz make a oops video in depth
waited since afternoon for this... now starting
Understood everything, Thanks a lot
we know your schedule is quite busy but still is a requestttt videos jldi upload kro bhaiya placements haiiiiii...and dsa ap hi se pdnaaa hme
Yes we are going every alternate day now!
Ho gaye placement aapki?
Excellent Mento till date, great conceptual briefing.
Thanks i truly understand the code & wondeful lecture :)
Understood! your explanation was excellent ❤
Understood. thank you so much for this video.
This consistency is what I'm expecting bhaiya
thank you so much bhiya , for providing dsa sheet and explaing the problems.
Hi striver, one observation I have made is, on finding 2nd largest , in brute force approach, if we have the 1st largest number is >1 times then only we need to back traverse the array for finding 2nd largest, in other case (other element's duplication) we don't need to back traverse an Array. am I right..? is there any test case that will fail my thought.. please let me know that test case so that I will rectify my mistake.
u are so amazing, I really now like to study. Thanks
bhaiyya aapse hi sikha he sab kuch, thankyou again raj bhaiyya
Thanks for the amazing explanation. You earned yourself a subscriber!
hey man I really really respect you as a person.
Best course for dsa 🔥🔥
Bhaiya your approach towards the remove duplicates is very good 😉
Amazing videos sir.🙏
Understood. Thanks bhaiya.
Understood Thank you Striver
Understood thanks bhaiya 💌
You are so good in simplifying things
Very good explanation 👏 👌
Understood Great explanation
Understood clearly bhaiya !!
The first 6 minutes are more than sufficient for me to pass the whole semester tbh
Understood....Thank u striver❤
Thanks buddy for helping us!!!
Simple and easy 👍
Understood, Thank You!
where can i find the complete lectures of DSA of your's ?
thank you brother for this kinda of efforts !!! definitely it will help me a lot to get placed in reputed company🤗🤩
Understood, thank you very much bhai
Just searching for this from a long time
Understood!
Thank You so much
You are great man in explaining the concept too much easy way ♥
bro college join krne wala hoon pls thoda sa guide kr dijiye
bhai ne kya gajab samjhaya hai, maza aa gaya
understood
i love the way to teach