15. Static Trees

  Рет қаралды 24,222

MIT OpenCourseWare

MIT OpenCourseWare

Күн бұрын

Пікірлер: 7
@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 :)
@maristotero3352
@maristotero3352 6 жыл бұрын
Thank you so much! It was uploaded 5 years ago but helped me with my struggles with LA very much!
@PinkuDebNath
@PinkuDebNath 11 жыл бұрын
Nice video! But I feel so stupid :| I lost track after LCA.
@ipmankus
@ipmankus 7 жыл бұрын
Read on topcoder :) , this is an uneasy explanation for competitive programming
@sheldonlai1650
@sheldonlai1650 7 жыл бұрын
Can you open the automatic caption feature?
16. Strings
1:24:30
MIT OpenCourseWare
Рет қаралды 126 М.
Binary Lifting (Kth Ancestor of a Tree Node)
18:01
Errichto Algorithms
Рет қаралды 100 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
6. Dynamic Optimality II
1:23:31
MIT OpenCourseWare
Рет қаралды 10 М.
26. Chernobyl - How It Happened
54:24
MIT OpenCourseWare
Рет қаралды 2,9 МЛН
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 3,8 МЛН
Segment Tree Range Minimum Query
27:44
Tushar Roy - Coding Made Simple
Рет қаралды 278 М.
2023 MIT Integration Bee - Finals
28:09
MIT Integration Bee
Рет қаралды 2,1 МЛН
10. Dictionaries
1:23:28
MIT OpenCourseWare
Рет қаралды 17 М.
Necessity of complex numbers
7:39
MIT OpenCourseWare
Рет қаралды 2,8 МЛН
Daniel Everett, "Homo Erectus and the Invention of Human Language"
1:10:43
Harvard Science Book Talks and Research Lectures
Рет қаралды 525 М.
Marvin Minsky
1:33:35
InfiniteHistoryProject MIT
Рет қаралды 884 М.
How many people are in the changing room? #devil #lilith #funny #shorts
00:39