Find the largest 3 elements in Array | Hindi | Geeks for geeks | Problem Solving | FAANG | Shashwat

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ต.ค. 2024

ความคิดเห็น • 17

  • @shashwat_tiwari_st
    @shashwat_tiwari_st  ปีที่แล้ว

    This is a very old video, for better sound and camera quality DSA videos, learn from the below playlist!
    Java Plus DSA ( Java + DSA + Problem Solving )
    th-cam.com/play/PLQ7ZAf76c0ZPVdhV1bAjFv0bQc1xHURzE.html

  • @nihalshinde9556
    @nihalshinde9556 ปีที่แล้ว

    I was finding 3rd max no. through sorting the array but now it's easy way to find it by this method .
    Thank You 👍🏻

  • @VishalSingh-h9s
    @VishalSingh-h9s ปีที่แล้ว

    i also search in this solution explanation ...thanks

  • @akash2626.-
    @akash2626.- ปีที่แล้ว

    Very good bhai

  • @sawankaushal3535
    @sawankaushal3535 ปีที่แล้ว

    Thanku so much sir ✨

  • @dundappateggi1831
    @dundappateggi1831 2 ปีที่แล้ว

    Need solution for O(k) where k is the kth largest number.

  • @roshan3224
    @roshan3224 9 หลายเดือนก่อน

    {1,1,1,1,1,0} here which one is the 3rd largest ???

  • @rajnikantrouth780
    @rajnikantrouth780 3 ปีที่แล้ว

    Thanks

  • @abhishek_singh512
    @abhishek_singh512 11 หลายเดือนก่อน

    Sir video continuosly zoom out zoom in so it is so irritating please update video sir 🙏🙏🙏

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  11 หลายเดือนก่อน

      Follow this playlist only for better quality videos.
      th-cam.com/play/PLQ7ZAf76c0ZPVdhV1bAjFv0bQc1xHURzE.html&si=lKkrxBe6eMfGqnlm

  • @rajnikantrouth780
    @rajnikantrouth780 3 ปีที่แล้ว

    Without ladder technique program will solve in O(n) time using variable maxx ,current, previous maxx

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  3 ปีที่แล้ว

      With the if else ladder logic, the time complexity is still O(n) and concepts are almost similar.

    • @rajnikantrouth780
      @rajnikantrouth780 3 ปีที่แล้ว

      @@shashwat_tiwari_st please send na solutions

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  3 ปีที่แล้ว

      @@rajnikantrouth780 I have already attached the link of the code in the description of this video.
      Check it.

  • @saxenavedant61
    @saxenavedant61 ปีที่แล้ว

    what if i want to find the first largest the second largest the third largest and so on... except for sorting and accessing the value via index what would be the best solution to find 1st 2nd 3rd 4th ...nth largesrt element? this solution wouldn't work you wouldn't mantain n variables to get n largest or the if else conditions to swap values right?

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  ปีที่แล้ว

      This solution is not feasible for all elements.
      One is sort
      Second option is Convert into BST and perform inorder