Smallest range in K lists | Hard and tricky | Love Babbar DSA sheet

Поделиться
HTML-код
  • Опубликовано: 24 окт 2024

Комментарии • 37

  • @sj_4038
    @sj_4038 5 месяцев назад +1

    i think we are moving minimum because at LeetCode
    We define the range [a, b] is smaller than range [c, d] if b - a < d - c or a < c if b - a == d - c.
    hence starting from minimum give correct answer

  • @ashutoshkumar4099
    @ashutoshkumar4099 9 месяцев назад +1

    Your way of explaining difficult concepts is great. Keep going

  • @dishadugad4761
    @dishadugad4761 Год назад +2

    [1,2] will be smallest at 11:11

  • @melodytunes2204
    @melodytunes2204 Год назад +3

    You are doing great work, you deserve much more attention and recognition.

  • @rushio8673
    @rushio8673 2 месяца назад +1

    what is the intuition behind picking minumum and moving from minimum index ?

  • @Bug_Hunt
    @Bug_Hunt 2 года назад +1

    Love it ! you're amazing !!!!!

  • @karanveersingh5535
    @karanveersingh5535 2 года назад

    AS USUAL EXCELLENT EXPLAINATION ADITYA

  • @ankitghosh9873
    @ankitghosh9873 2 года назад +2

    can u plz explain why did u used a.value>b.value .Since we want to arrange them in increasing order so it should hold like a.value

    • @ashutoshkumar4099
      @ashutoshkumar4099 9 месяцев назад +1

      prority of small element is greater in minHeap. It returns element having higher priority

  • @aman_rockstar31
    @aman_rockstar31 Год назад

    very nice explanation

  • @utkarshshrivastava3647
    @utkarshshrivastava3647 3 года назад +1

    Your accent matches with Ravindrababu Ravula. Great explanation btw!!!

    • @adityarajiv6346
      @adityarajiv6346  3 года назад +1

      Ohh really?, Thanks btw!!.
      Please share the channel with all your friends!

  • @madhvisuri5907
    @madhvisuri5907 3 года назад +1

    1.can u plz explain why did u used a.value>b.value .Since we want to arrange them in increasing order so it should hold like a.value

    • @smitkumarrathod5665
      @smitkumarrathod5665 3 года назад

      Same dout ,if you have found any solution then pls explain to me.
      Thanks in advance

    • @umer_c0des330
      @umer_c0des330 2 года назад

      In priority queue, we have to make class so that we can make overloading operator.

    • @ashutoshkumar4099
      @ashutoshkumar4099 9 месяцев назад

      prority of small element is greater in minHeap. It returns element having higher priority

  • @ritikamittal366
    @ritikamittal366 3 года назад +1

    Amazing video excellent sir thankyou

    • @adityarajiv6346
      @adityarajiv6346  3 года назад

      Hey don't call me sir😂.
      Glad it helped you😀.
      Please share the channel with all your friends and subscribe 😀🙏.

  • @ADNANAHMED-eo5xx
    @ADNANAHMED-eo5xx 2 года назад

    Great solution

  • @kakhatezelashvili3368
    @kakhatezelashvili3368 3 года назад +1

    Why are moving min pointer instead of max one ? since range can be decreased by moving max pointer as well ? even if array is sorted

    • @Bug_Hunt
      @Bug_Hunt 2 года назад

      because we want to find the smallest range and the more you decrease the max, bigger the range will be.

  • @gauravbanerjee2898
    @gauravbanerjee2898 3 месяца назад

    Thanks a lot

  • @yatharthdaksh7985
    @yatharthdaksh7985 3 года назад +1

    Amazing Explanation Bro!!... Thanks alot

    • @adityarajiv6346
      @adityarajiv6346  3 года назад

      Glad that it helped you 😀.
      Please share the channel with all your friends and subscribe 😀🙏.

  • @arnabnandy2828
    @arnabnandy2828 3 года назад +1

    Amezing explanation buddy..
    If pair is not allowed in gfg then we can create k separate single LL and use the priority queue to get the range.
    How do you feel about this approach?

  • @cppvideos7257
    @cppvideos7257 2 года назад

    good solution

  • @priyankakanojia7282
    @priyankakanojia7282 3 года назад +1

    nice explanation....!!

    • @adityarajiv6346
      @adityarajiv6346  3 года назад

      Glad that it helped you!. Please Share the channel with all your friends and subscribe!

  • @Caroline-up8qw
    @Caroline-up8qw 2 месяца назад

    pls send link of the book

  • @vivekmatalia2315
    @vivekmatalia2315 3 года назад +1

    nice one

    • @adityarajiv6346
      @adityarajiv6346  3 года назад

      Thank you!. Glad it helped.
      Please check out the other videos on this channel.
      Share with your y and subscribe 😀🙏.

  • @sangamchoudhary6977
    @sangamchoudhary6977 3 года назад +1

    worth watching

    • @adityarajiv6346
      @adityarajiv6346  3 года назад

      Glad to know 😀.
      Please share the channel with all your friends and subscribe 😀🙏.

  • @uditpanjiyar3203
    @uditpanjiyar3203 Год назад

    sorry to say but your explaination is not upto mark 😔😔