Find Second Largest Element in Array | Remove duplicates from Sorted Array | Arrays Intro Video

Поділитися
Вставка
  • Опубліковано 2 гру 2024

КОМЕНТАРІ • 1 тис.

  • @takeUforward
    @takeUforward  Рік тому +282

    Let's march ahead, and create an unmatchable DSA course! ❤
    Use the problem links in description.

    • @ParasSharma-mf8or
      @ParasSharma-mf8or Рік тому +1

      I will add it, don't worry

    • @mityamkumar1158
      @mityamkumar1158 Рік тому +3

      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... 😂

    • @sahilbhaiya6200
      @sahilbhaiya6200 Рік тому +2

      456 a to z start kar diye h 😊

    • @prithammahato1915
      @prithammahato1915 Рік тому +1

      HAVE UNDERSTOOD_COMPLETELY

    • @039puneethbatchu2
      @039puneethbatchu2 Рік тому +1

      Hello sir, You're so much passionate about teaching. Each and every word of your video goes into my mind . Thank you sir.

  • @mahmoodakhtar-df1ze
    @mahmoodakhtar-df1ze 8 місяців тому +23

    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. ♥

  • @bhaiookabhai
    @bhaiookabhai 11 місяців тому +232

    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!

    • @sriemandi3978
      @sriemandi3978 9 місяців тому +3

      bro where are you ?

    • @pratikdongre4376
      @pratikdongre4376 6 місяців тому +10

      bhag gya kya padhai kr

    • @sambitpradhan1211
      @sambitpradhan1211 6 місяців тому +2

      @bhaiookabhai kaaha tak pahuncahe dsa , mae aj start kar raha hun

    • @showdownx8276
      @showdownx8276 4 місяці тому +8

      Arre bhai update to do .... gand faat gaya ki placement ho gaya ?

    • @manasisingh294
      @manasisingh294 4 місяці тому

      @@pratikdongre4376 lmao

  • @mindpower185
    @mindpower185 Рік тому +76

    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

  • @shubhrajit2117
    @shubhrajit2117 11 місяців тому +21

    At 34:28 the set can be made simply as
    set st(arr, arr + n);

    • @VinayakMahadev11
      @VinayakMahadev11 8 днів тому

      Is there a set in c++? Do I need to include any header file for using it

    • @shubhrajit2117
      @shubhrajit2117 8 днів тому +1

      @VinayakMahadev11
      Just use # include
      You won't need any other header file then.

    • @VinayakMahadev11
      @VinayakMahadev11 8 днів тому

      @@shubhrajit2117 tysm bro

  • @yhbarve
    @yhbarve Рік тому +169

    The 2-pointer method is so efficient compared to brute force...and it's so short as well...loved it! Understood

    • @CodewithKing360
      @CodewithKing360 9 місяців тому

      can you tell me in code to find slarge why we write elseif block

    • @abhisheksharma9425
      @abhisheksharma9425 9 місяців тому +1

      @@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;
      }

    • @vedikamishra009
      @vedikamishra009 2 місяці тому +1

      @@CodewithKing360 for ex. {12, 35, 1, 10, 34, 1}
      because if we won't write it, the number will be 12 instead of 34, because it won't assign anything to second largest, once it has found a value less than largest

    • @CodewithKing360
      @CodewithKing360 2 місяці тому

      @@vedikamishra009 thanks brother tab mera dimag chota tha array ke next level ke question solve karne ke bad vah apne aap samaz aa gayatha

  • @jaykaantshikre751
    @jaykaantshikre751 Рік тому +8

    Understood , Never thought easy problems could be solved with such optimal solutions.

  • @Dev2.0
    @Dev2.0 Рік тому +116

    Completed DP series... That's pure Gold..
    Now watching this series to revise concepts....
    Striver Bhaiya You are my inspiration 🥺🥺

    • @AppaniMadhavi
      @AppaniMadhavi 10 місяців тому +7

      Is that Dp series helpful to clear google dsa rounds??

    • @saswatrath4646
      @saswatrath4646 8 місяців тому +5

      yes, super helpful uske sath agar love babbar and interviewbit ka addditional questions laga dega to interview bhi clear ho jayega @@AppaniMadhavi

    • @AppaniMadhavi
      @AppaniMadhavi 8 місяців тому

      Tq for giving clarity@@saswatrath4646

    • @aditiapar9355
      @aditiapar9355 4 місяці тому

      @@saswatrath4646 bs dp mei ya har topic mei in dono k additional question lgao?

  • @Manishgupta200
    @Manishgupta200 Рік тому +17

    Superb Striver. The Removed duplicates was much thinkable but solved finally. Thankyou for such an amazin tutorial

  • @thefourhourtalk
    @thefourhourtalk 11 місяців тому +8

    this course your explanation is just wow ; I am regretting that this piece of gold Ive found a bit late

  • @chintamanipala
    @chintamanipala Рік тому +11

    I loved your teaching style as well as how we can build our logic from a brute force approch to optimal approch ❤❤❤

  • @shivanshmittal4297
    @shivanshmittal4297 8 днів тому

    So i am a total fan of Kunal Kushwaha for DSA, and this was the first video I saw after many friends said to give a try. I must say for problems oriented DSA, this is good. Now, I can keep a balance between theory clearance and questions practice. Kudos to both mentors.

  • @siddhant2943
    @siddhant2943 Рік тому +47

    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.

    • @anuragsingh-c1x
      @anuragsingh-c1x Рік тому +1

      bro i am starting dsa. how is strivers for that? also apne kitna kaar liya hai

    • @yourcaremail
      @yourcaremail 11 місяців тому

      @@anuragsingh-c1x 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.

  • @anishaa3298
    @anishaa3298 12 днів тому

    there was once in an interview, I was able to sort numbers from two sets of arrays, but I couldn't find second largest element. What you said in 13:38 is so true. Now I will never forget that question.

  • @AbhishekSingh-mh2fg
    @AbhishekSingh-mh2fg Рік тому +9

    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.

  • @parthkandwal8343
    @parthkandwal8343 Рік тому +19

    You are doing an amazing job Sir by providing such brilliant content. Thank you very much Sir.

  • @thor1626
    @thor1626 Рік тому +11

    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)

  • @AkshayP-x2t
    @AkshayP-x2t Рік тому +3

    Great explanation, no rocket science and maths, Thank you for such great content.

  • @pratikkumar20
    @pratikkumar20 Рік тому +3

    Just completed. It was amazing, the way you explain, hats off to you
    Thank you.

  • @SatwikSharma21bcs080
    @SatwikSharma21bcs080 5 місяців тому +1


    Introduction to Arrays in DS Algo course
    00:04

    Defining array globally and accessing its elements
    02:30

    Optimizing solutions in interviews is crucial
    07:11

    Identifying the second largest element in an array using a brute force solution and the optimal solution.
    09:21

    To find the second largest element in an array, start from the back and compare elements with the largest.
    13:40

    Brute force approach to find second largest element in array
    15:53

    Algorithm for finding second largest element in an array
    20:17

    Algorithm to find the second largest element in an array
    22:24

    Finding the second largest element in an array
    26:31

    Check if array is sorted in non-descending order
    28:39

    Modify given array to find unique elements
    32:36

    Removing duplicates and finding second largest element using sets
    34:40

    Finding the second largest element in an array.
    38:50

    Two pointer approach for finding second largest element in array
    Click to expand
    41:00

  • @abhijeetmishra3804
    @abhijeetmishra3804 Рік тому +9

    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.

  • @ParasSharma-mf8or
    @ParasSharma-mf8or Рік тому +13

    0:39 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 in c++
    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 coding implementation
    31:26 Remove duplicates in place from sorted array
    40:40 Pseudo code
    42:12 coding implementation
    Time complexity is O(n) and space complexity is O(1) for all optimal approaches

    • @takeUforward
      @takeUforward  Рік тому +6

      Thank you!!

    • @Unknown-ng8me
      @Unknown-ng8me Рік тому

      @@takeUforward Please make video on OOPs concepts.

    • @umakantbhosale4718
      @umakantbhosale4718 Рік тому +1

      ​@@takeUforwardJava collection tab is empty in your course. Please add good resource to learn for it.

    • @ANUJKUMAR-wc9dz
      @ANUJKUMAR-wc9dz Рік тому +2

      @@umakantbhosale4718 for Java collection you can watch riddi dutta video

    • @brajeshmohanty2558
      @brajeshmohanty2558 Рік тому

      @@ANUJKUMAR-wc9dz bhai notes nahi milraha hai site pai Kahan pei mil sakta hai notes

  • @webtestingui7187
    @webtestingui7187 Рік тому +6

    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

  • @The_yellow_flash-07
    @The_yellow_flash-07 6 місяців тому +1

    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!

  • @pranshuatrey
    @pranshuatrey Рік тому +8

    My damm god, how on earth anyone can teach so brilliantly. Sir u are such a gem.. 💎💎💎💎

  • @Prasadk2003
    @Prasadk2003 4 місяці тому

    Today I began the journey of solving problems of DSA , Thank you striver for this great series

  • @VishnuKumar-vi8hh
    @VishnuKumar-vi8hh Рік тому +10

    It was great learning Thanks❤ Bhaiya
    I have now more interested in coding after seeing your playlist , always feels motivated.

  • @aayushsingh5614
    @aayushsingh5614 10 місяців тому +1

    This guy will make every BUSINESS TEACHER'S business down for sure.....

  • @data-ai-yt
    @data-ai-yt 8 місяців тому +4

    The first 6 minutes are more than sufficient for me to pass the whole semester tbh

  • @btsarmylachimolala2333
    @btsarmylachimolala2333 Місяць тому

    started today, the video is very well explained.
    and I will comment on every single video after it is completed.

  • @sarthakkhandelwal3915
    @sarthakkhandelwal3915 Рік тому +6

    Best course for dsa 🔥🔥

  • @JhonAbraham-t4c
    @JhonAbraham-t4c 4 місяці тому

    love this man the way you explained ,no one explain like you before ,this is the way of teach the code100%.

  • @Me_Meraj
    @Me_Meraj Рік тому +4

    Best DSA series i ever watch
    Really it is better than paid course

  • @rnjnmhta.catomato
    @rnjnmhta.catomato Рік тому

    your explanation feels like pure science! beautiful man

  • @vilen2685
    @vilen2685 Рік тому +3

    I'm enjoying now to do DSA !!!
    Thanks Striver, thanks a lot.

  • @vikhashjp
    @vikhashjp 9 місяців тому

    Sir you're a Legend and I have a new interest in Coding after watching your videos and practicing constantly. Thank You ❤

  • @AmartyaPardeshi
    @AmartyaPardeshi Рік тому +6

    Great efforts, thanks for this precious course!

  • @vidushibhardwaj1415
    @vidushibhardwaj1415 8 місяців тому

    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❤

  • @ayushi4411
    @ayushi4411 Рік тому +102

    Sir plz upload the videos as soon as possible coz we have to wait for a single video for about two weeks 🥹🥲

    • @takeUforward
      @takeUforward  Рік тому +68

      Yes we are going every alternate day now!

    • @ayushi4411
      @ayushi4411 Рік тому +7

      @@takeUforward thanks sir!!!

    • @prajwalpatil9055
      @prajwalpatil9055 Рік тому

      Yes sir ur videos are best for revising dsa

    • @Lucifer-xt7un
      @Lucifer-xt7un Рік тому +3

      ​@@takeUforward sir please upload videos alternatively as promised becoz relaying on you completely🥺🥲

    • @BhanuPratapSinghRajawat-iz2tf
      @BhanuPratapSinghRajawat-iz2tf Рік тому +18

      @@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

  • @Juhi_Kalra
    @Juhi_Kalra 2 місяці тому +1

    Understood (in 2024) 👍Thanks for making this series🙌

  • @JohnCena-uf8sz
    @JohnCena-uf8sz 4 місяці тому +8

    I am watching in sequence, the best explanation frrrr.. SOME ONE REMIND ME TO STUDY BY LIKING THE COMMENT

  • @samlinus836
    @samlinus836 Рік тому

    Such a big thing to share your knowledge in this free platform while there r lots of paid platforms... Thanks a lot
    Understood bruh

  • @priyanshi3265
    @priyanshi3265 Рік тому +5

    Thank you striver for the amazing explanation 😊

  • @mehaksharma9391
    @mehaksharma9391 Рік тому +9

    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

    • @takeUforward
      @takeUforward  Рік тому +6

      Yes we are going every alternate day now!

    • @Tussu17
      @Tussu17 5 місяців тому

      Ho gaye placement aapki?

    • @TunTunTanu
      @TunTunTanu 3 місяці тому

      bhai as striver has not uploaded the string video from where can i watch that videos?

  • @pranavmahendra3423
    @pranavmahendra3423 11 місяців тому

    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

  • @cheddar4848
    @cheddar4848 Рік тому +5

    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)

  • @madhukiran8093
    @madhukiran8093 Рік тому +1

    Helpful in getting back on track
    after a long Break

  • @Josuke217
    @Josuke217 4 місяці тому +85

    Started this playlist: 13/7/2024

    • @vikramkumarsoni5283
      @vikramkumarsoni5283 4 місяці тому +3

      U did any other playlist before?

    • @AmandeepSingh-rd6ql
      @AmandeepSingh-rd6ql 4 місяці тому +6

      Finished on same date bro best of luck for your journey

    • @gladiator8316
      @gladiator8316 3 місяці тому

      ​@@AmandeepSingh-rd6qlBro what's your opinion on this course

    • @pallikantisanthoshkumar2671
      @pallikantisanthoshkumar2671 3 місяці тому

      How much did your improve​@@AmandeepSingh-rd6ql

    • @TunTunTanu
      @TunTunTanu 3 місяці тому

      @@AmandeepSingh-rd6ql bhai as striver has not uploaded the string video from where can i watch that videos?

  • @brindhadhinakaran9672
    @brindhadhinakaran9672 Рік тому +2

    Thanks

  • @cinime
    @cinime Рік тому +8

    Understood! Super fantastic explanation as always, thank you very much!!

  • @muralidharreddy8981
    @muralidharreddy8981 7 місяців тому +1

    In java if check the array is sorted:
    public class Solution {
    public static int isSorted(int n, int []a) {
    // Write your code here.
    for(int i=0;ia[i+1]){
    return 0;
    }
    }
    return 1;
    }
    }

  • @senseiAree
    @senseiAree Рік тому +7

    I am a pretty fast thinker so I was not having much problem but my anxious brain asked me how on earth is he writing those code so freaking fast... I realised I was listening to 1.5x speed.

    • @sudeepgupta57
      @sudeepgupta57 5 місяців тому +1

      What is your code forces rating

  • @rariraj4858
    @rariraj4858 2 місяці тому

    Understood. Perfect explanation. Easy to follow.Thanks so much Striver 😇

  • @tunapradhan7571
    @tunapradhan7571 Рік тому +3

    Bhaiya dsa to Kara rahe ho aaap but sometimes we get frustrated because sometimes after giving sufficient amount of time I can't able to solve a single question also
    Like in your graph series,you taught absolutely in a excellent way ,but the problems is ki I can't able to solve any of those questions by myself..so can you please upload a session a video in this on UA-cam

  • @Anmol-dz7sx
    @Anmol-dz7sx Рік тому +2

    In the last question while applying the brute force approach by using set data structure the overall time complexity mentioned is O(n*log(n))+O(n), whereas the actual time complexity to insert elements in a set data structure is O(log(n)) + The time complexity to iterate over the set elements using the for loop is O(n). So The Overall time complexity will be O(log(n)) + O(n). Please Correct Me If I'm Wrong!

    • @dhanushm9166
      @dhanushm9166 Рік тому +2

      For inserting a single element the time complexity is O(log n) here we need to insert all the elements in the array suppose in worst case we may have n elements so the time complexity for inserting n elements O(nlogn) after that he puts the unique elements back to starting position of the array so for that tc is O(n) and now the overall tc is 0(nlogn +n) ....

  • @byteeeeeeee
    @byteeeeeeee 10 місяців тому +3

    Hey there!! I'm currently in my sixth semester. I want to revise my DSA for my placements, which start next semester. Just leaving a comment to keep track of my progress.

  • @jeeveshkumar9682
    @jeeveshkumar9682 10 місяців тому

    understood, and the idea of not making very long videos is superb. Long videos are scary.
    thanx for ur efforts

  • @vatsalsharma6384
    @vatsalsharma6384 Рік тому +10

    For the last question of removal of duplicates, for the brute force approach, instead of storing it in the set data structure, if we try to store it in a vector again by just putting a condition at the entry that (enter the vector only if you are different from the previous element). Then time complexity will reduce to O(n), and space complexity will be O(1).
    Am I right????

    • @Rks2302
      @Rks2302 Рік тому

      for a particular element to put in vector we need to look for all the elements already present in vector..
      time complexity would be 0(n^2)

    • @an__kit
      @an__kit Рік тому

      @@Rks2302 We don't have to look for every element in vector just put the value in temp variable which you entered last and when find the next different value push it into new vector formed and update the temp variable. I think that will work.

    • @Rks2302
      @Rks2302 Рік тому

      @@an__kit suppose already my vector has {1,2,3} elements and by your logic temp=3 and suppose the next element to be inserted is 1 again and since temp is different from 1 another 1 would be inserted isnt it!?

    • @an__kit
      @an__kit Рік тому +1

      @@Rks2302 No we will check for greater element to insert as given array is sorted.

    • @Rks2302
      @Rks2302 Рік тому +1

      @@an__kit my bad..yes ur correct didnt noticed the array is sorted🥲

  • @Deepak-hv8uh
    @Deepak-hv8uh 10 місяців тому +2

    bhai ne kya gajab samjhaya hai, maza aa gaya

  • @ryanmathew6397
    @ryanmathew6397 Рік тому +5

    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.

  • @sujal.t.s8461
    @sujal.t.s8461 8 місяців тому +1

    we use this loop to find 2nd largest element
    int max1=0,max2=0;;
    for(auto it:arr)
    {
    if(it>max1)
    {
    max2=max1;
    max1=it;
    }
    }
    cout

    • @KoushikDas2005
      @KoushikDas2005 8 місяців тому +2

      Why max1 and max2 are initialised to 0 , if it's not existing in the array or even if it's existing in the array, it will result in an error only.
      Rather it should be max = arr[0] , max2= Integer.MIN_VALUE or you can take both as any arbitrary small value just like I have done in Java.
      But taking 0 and checking it will give you wrong results

  • @codeedict3919
    @codeedict3919 Рік тому +5

    Understood...🔥🚀🔥 || Loving it so far. Thanks for amazing content.

  • @MaheshKumar-jc8sp
    @MaheshKumar-jc8sp 4 місяці тому

    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.

  • @abbas__00
    @abbas__00 Рік тому +8

    Sir , please put all videos in one playlist named DSA because that would be easy for us to watch one by one ....... please sir 🥲

  • @kavyanshsrivastava4211
    @kavyanshsrivastava4211 9 місяців тому

    Left rotation of array by one position can be simply done by: -
    arr.push_back(arr[0]);
    arr.erase(arr.begin());
    return arr;
    No traversal needed. Hence reduces time complexity.

  • @venugopal_2003
    @venugopal_2003 Рік тому +3

    great! understood very well

  • @VikashKumar-tg3ot
    @VikashKumar-tg3ot 7 місяців тому +1

    I UNDERSTOOD EVERYTHING .

  • @Codewithkrishnadtu
    @Codewithkrishnadtu Рік тому +3

    bhaiya in second largest element question , how can u return an integer value when the function return a vector ?

    • @takeUforward
      @takeUforward  Рік тому

      Follow it properly the code

    • @JunaidAnsari-my2cx
      @JunaidAnsari-my2cx Рік тому

      I think the function took a vector as input, and we were to return an integer value

    • @senseiAree
      @senseiAree Рік тому

      int secondLargest(...)
      It is returning integer by definition... Hope your doubt was resolved 5 months ago

  • @harshavardhan184
    @harshavardhan184 Рік тому +1

    This consistency is what I'm expecting bhaiya

  • @nikhilkashyap3537
    @nikhilkashyap3537 3 місяці тому

    2nd questions answer:
    vector getSecondOrderElements(int n, vector a) {
    int max = *max_element(a.begin(), a.end());
    int min = *min_element(a.begin(), a.end());
    int big = 0, small = max;
    for (int i = 0; i < n; i++) {
    if (a[i] > big && a[i] != max)
    big = a[i];
    if (a[i] < small && a[i] != min)
    small = a[i];
    }
    return {big, small};
    }
    with time complexity: O(n)
    and space complexity: O(1).

  • @chaitu11
    @chaitu11 2 місяці тому

    Awesome teaching just fall in love with coding

  • @RailExpressbyPreetam
    @RailExpressbyPreetam 4 місяці тому +1

    The way you explained largest element ❤❤

  • @rammohan7480
    @rammohan7480 3 місяці тому

    The way you are explanation is very understandable bro thank you

  • @letsdecodewithharsh
    @letsdecodewithharsh 6 місяців тому +1

    You are great man in explaining the concept too much easy way ♥

    • @AtulRawat-sf2lw
      @AtulRawat-sf2lw 6 місяців тому

      bro college join krne wala hoon pls thoda sa guide kr dijiye

  • @inspirationalyouthicons4998

    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

  • @CodewithKing360
    @CodewithKing360 9 місяців тому

    Bhaiya your approach towards the remove duplicates is very good 😉

  • @balakrishna6240
    @balakrishna6240 2 місяці тому

    I love the way you are teaching, awesome

  • @PrithaMajumder
    @PrithaMajumder 6 місяців тому +1

    Raj, Thanks a lot for This Amazing Video about C++ Arrays
    Video - 1 Completed ✅

  • @saswatrath4646
    @saswatrath4646 8 місяців тому

    Understood pro max bhai, Jai Jagannath!

  • @sahilbirnale3949
    @sahilbirnale3949 4 місяці тому

    Brute , Better , Optimal .
    You are best 💻

  • @gulshankumar9896
    @gulshankumar9896 7 місяців тому

    Mindblowing video on arrays in c++ ;
    thanks striver bhaiya for providing all these awesome materials at free of cost ;
    😇

  • @prajeetdubey8213
    @prajeetdubey8213 15 днів тому +1

    For second largest element if we use the better approach which is told here, there will be a problem if the array has same element like {10,10,10}. Because we have initialized secondlargest==INT_MIN but what if arr[i]>secondlargest && arr[i]=largest. In that case our secondlargest will remain as INT_MIN only. So in that case we have to tell that no second largest element exists.
    Sol- In the second pass we have to make one more statement as else if(secondlargest==INT_MIN){ return -1}

  • @DeepaPatel-bq8fm
    @DeepaPatel-bq8fm 7 місяців тому

    You are so good in simplifying things

  • @druvabhagavatula
    @druvabhagavatula 2 місяці тому

    Understood Bhaiya but I had a small doubt in Sorted and rotated problem only all are super cool 🔥🔥🔥🔥

  • @secretdreams201
    @secretdreams201 10 місяців тому

    Thankyou for giving this well structured course.

  • @Omkar-fg4ws
    @Omkar-fg4ws 9 місяців тому +1

    thank you so much bhiya , for providing dsa sheet and explaing the problems.

  • @shameemahamad2617
    @shameemahamad2617 3 місяці тому

    Big thumb 👍 for providing such exceptional remarkable contents.

  • @MaheshKumar-jc8sp
    @MaheshKumar-jc8sp 4 місяці тому

    Excellent Mento till date, great conceptual briefing.

  • @shokir_a_pardaev
    @shokir_a_pardaev Місяць тому

    Your teaching style is awesome with passion and energy. What program do you use to write and teach? it looks cool. It would be great if you can also make short video on how you teach and record your classes. Thank you.

  • @cse_10_payelpaul53
    @cse_10_payelpaul53 2 місяці тому

    Striver Striver Striver!!!!!!! You are just awesome ❤ Thank you so much!!!!

  • @HimanshuSharma-jw2qm
    @HimanshuSharma-jw2qm 17 днів тому +1

    Sir At 37:27 , if the given array is nums = [1, 2, 3, 3, 4, 5], then this approach does not work on this.

  • @Swati-uy6wg
    @Swati-uy6wg Рік тому

    This course helped me a lot. Thankyou bhaiya!

  • @vasukumar9645
    @vasukumar9645 27 днів тому

    Excellent teaching Everything Understand

  • @VipulChuahan-y8e
    @VipulChuahan-y8e Рік тому +1

    if it is not necessary for the array to be sorted then in the last question we can use unordered set in which insertion is in constant time and the question will be solved very easily in linear time

  • @KrishnaKumar-b4m9p
    @KrishnaKumar-b4m9p 3 місяці тому

    at 36:39 in order to insert the elements in the set we are iterating over the entire array one by one so its time complexity is O(n) and not O(nlogn) . a little correction from my side . Thanks.

  • @MaheshKumarS-mt6ot
    @MaheshKumarS-mt6ot 5 місяців тому

    thank you brother for this kinda of efforts !!! definitely it will help me a lot to get placed in reputed company🤗🤩

  • @tamilentertainment8816
    @tamilentertainment8816 4 місяці тому

    What is the purpose of using vector. Pls explain

  • @rijumondal6876
    @rijumondal6876 Рік тому

    hey man I really really respect you as a person.

  • @aswindilip6166
    @aswindilip6166 5 місяців тому

    Understood! your explanation was excellent ❤

  • @BhavnaChandera-v3d
    @BhavnaChandera-v3d 3 місяці тому

    Amazing explanation 🙌🏻 Thank you striver ❤