It’d be really nice if someone can take up a problem as example and explain the approach of solving it using a persistent segment tree.There are 1-2 problems on codechef but editorials of those problems explain very little about the persistence part.

e.g. for example to solve this problem(or any other problem) using persistent segment tree

http://www.spoj.com/problems/MKTHNUM/

what will be the approach i.e. if someone can explain how we are building n segment trees and after that how we are querying,it’ll be very helpful.