range minimum query using segment trees

range minimum query or rmq in short is a classic programming problem in which for given range of an array we have to print the minimum value within the range of the array.

 

https://gist.github.com/400a114634d7ee09f2b7


references:
http://en.wikipedia.org/wiki/Range_minimum_query
http://www.geeksforgeeks.org/segment-tree-set-1-range-minimum-query/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s