[CSES][Sorting and Searching] Sliding Cost

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

КОМЕНТАРІ • 17

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

    Your videos are really great. i feel lucky that I found your channel

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

    you are doing really great work.your explanation is just awesome.thanks alot.

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

    13:21 Why begin? I thought the set was always sorted in ascending order so the median would be at the end of the leftset ...

    • @todaytech7011
      @todaytech7011 11 місяців тому +1

      yes set is sorted but you can't element from set using index you have to use iterator so begin iterator give the first element

    • @neatlystructured
      @neatlystructured  11 місяців тому +2

      If you look closer, you ll see that i used rbegin not begin. This means reverse begin and would give the largest element in the set. So you are right about your thinking, but we cannot use end because it is actually the end of the set and doesnt contain any value

  • @madmax2442
    @madmax2442 3 роки тому +1

    Thanks a lot! Really clever

  • @anuragagarwal5776
    @anuragagarwal5776 3 роки тому +1

    Thanks agian man!!
    It helped a lot!

  • @joshua_dlima
    @joshua_dlima 2 роки тому +1

    thank you!

  • @ANGELGARCIA-rk1qq
    @ANGELGARCIA-rk1qq 2 роки тому +1

    Thank's man this is very usefull.

  • @techstuff9830
    @techstuff9830 2 роки тому +2

    How can we do it with ordered_set ?