15. Static Trees

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

КОМЕНТАРІ • 7

  • @maristotero3352
    @maristotero3352 6 років тому

    Thank you so much! It was uploaded 5 years ago but helped me with my struggles with LA very much!

  • @mihailstoian7237
    @mihailstoian7237 4 роки тому

    As an optimization for step 4 (lookup table), you can even shave another log, since in those chunks you only have to query at the margins (either a prefix query or a suffix one).

    • @jeroenodb
      @jeroenodb 3 роки тому

      But what if you get handed a very small query in a block from position 2 to 0.5 log(n)-1? Then you don't have the answer stored in the lookup table and you cannot answer faster than walking from 2 to 0.5log(n)-1, which takes O(log(n)) time.

    • @mihailstoian7237
      @mihailstoian7237 3 роки тому

      @@jeroenodb Right, I also figured that out some hours after having writed that :)

  • @PinkuDebNath
    @PinkuDebNath 11 років тому +6

    Nice video! But I feel so stupid :| I lost track after LCA.

    • @ipmankus
      @ipmankus 7 років тому +2

      Read on topcoder :) , this is an uneasy explanation for competitive programming

  • @sheldonlai1650
    @sheldonlai1650 7 років тому

    Can you open the automatic caption feature?