M.Hoffman's blog

By M.Hoffman, history, 8 years ago, In English
  • Hello
  • Suppose we heve a balck box that can get a tree and each time we give it two vertex (for example u , v)it gives us lowest common ancestor (LCA) of u and v.
  • Now you have an array A of size N and you have given M queri , each query have two integer L , R that want you to find minimum integer from L to R in A , use black box to answer each query.
  • please write your solution in comment :))

Full text and comments »

Tags lca, rmq
  • Vote: I like it
  • +4
  • Vote: I do not like it

By M.Hoffman, history, 8 years ago, In English

Full text and comments »

Tags scc
  • Vote: I like it
  • +4
  • Vote: I do not like it