Hi Guest, Login

info technical

Merge Sort Tree for Range Order Statistics tutorials

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 
Merge Sort Tree for Range Order Statistics

Given an array of n numbers, the task is to answer the following queries:

  kthSmallest(start, end, k) : Find the Kth smallest                                number in the range from array                               index 'start' to 'end'.  

Examples:

  Input : arr[] = {3, 2, 5, 1, 8, 9|       Query 1: start = 2, end = 5, k = 2       Query 2: start = 1, end = 6, k = 4  Output : 2           5  Explanation:  [2, 5, 1, 8] represents the range from 2 to   5 and 2 is the 2nd smallest number   in the range[3, 2, 5, 1, 8, 9] represents   the range from 1 to 6 and 5 is the 4th  smallest number in the range  



About us

We provide real application for executing that incredible idea our clients have. Joomhome is a leading Web designing solutions organization, servicing customers in US, UK, Canada, Brazil, Italy, Netherlands, Germany, Australia, Russia, Ireland, Israel, Nigeria, Spain and many more