Kth Smallest | GFG POTD | C++ | Java | Code Kar Lo

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

КОМЕНТАРІ • 15

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

    k

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

      Yes that is why i have compared it with 0 only.

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

    Hello Sir, we can do the same problem in O(N), using Quickselect Algorithm, Thanks for the great explanation.

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

      No brother it totally depend on the type of test case. Worst case for qucik select can be N^2. Thanks

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

      @@code_kar_lo Ya, that's true, worst case time complexity goes N^2.

  • @AyushKumar-id9np
    @AyushKumar-id9np 2 місяці тому

    Thanks for Guiding me through your video , I always watch your video even i solve question myself .
    As, Always there is a new thing to learn from your video

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

    I have one doubt why we are traversing array index from i=1 instead of i=0 in the last loop, since array indexing always start from 0..please clear..

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

      Yes but in the given array we do not have any zeros as par the constraints that is why we are traversing from 1.

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

    nycc .. just a suggestion try to explain gfg/ leetcode contest solutions . ur views will also go up . THANKYOU

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

      Thanks. I have time issues otherwise i can upload leetcode as well