Hackerrank Weather Observation Station 20 solution | Start-Tech Academy

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • Follow Start-Tech Academy on
    Twitter: / starttechacade1
    Facebook: / starttechacademy
    Website: www.starttecha...
    TH-cam Channel: / @starttechacademy

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

  • @armangupta3428
    @armangupta3428 21 วันที่ผ่านมา

    Correct my understanding. This query is selecting a lat_n value from the set such that there are an equal count of lat_n values that are lower than the selected value as there are lat_n values higher than the selected value. How would this work if the number of lat_n values are even? If the number of lat_n values were even, the median would not be a value in the set, it would be the mean of the 2 middle most values of the set.

  • @talhanaeemrao4305
    @talhanaeemrao4305 ปีที่แล้ว +4

    it seems it is working by counting the rows where the number of rows > or < a number (which is median) get equal. but in case of even number of records, how will it work?

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

    Can this be considered efficient ? I am asking this because for every lat value, two selects will be run right ?

  • @nimishjhawar7517
    @nimishjhawar7517 ปีที่แล้ว +2

    Hi brother can you explain me in detail why you wrote your query in that way

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

    Can you visualize the process of this code with smaller data sample? I can't visualize the subquery part.

  • @aaaryaamse
    @aaaryaamse ปีที่แล้ว +1

    Is it logically correct if there are even number of records?

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

    NOt working in MYSQL

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

      Its working, you just need to pay attention.