How can you augment a splay tree so you can find how many items are between x and y? — Store size of subtrees at each node. Find x, splay to root. Each splay, insert, and delete must maintain size in node. Find y, and along the way add up the sizes in the left subtrees, and 1 for each visited left-hand node. Splay y to root to ensure balance.

G
picture loading error handler
1227 thought(s)1.2K

Google Interview

This flashcard deck made by jwasham contains knowledge about google interview. For more details, please follow https://github.com/jwasham/google-interview-university
interview
computer science
development

Explore more quotes

ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha
ahmed kamel taha