11402

 

12436

Some good links to learn segmented data structure:  click here