1. The lowest common ancestor. Finding of O (sqrt (N)) and O (log N) with preprocessing O (N)
2. The lowest common ancestor. Finding of O (log N) with preprocessing O (N log N) (the method of lifting the binary)
3. The lowest common ancestor. Finding the O (1) preprocessing with O (N) (the algorithm Farah-Colton and Bender)
4. Task RMQ (Range Minimum Query - at least in the interval). The decision of the O (1) preprocessing O (N)
5. The lowest common ancestor. Finding the O (1) in offline mode (algorithm Tarjan)