Sunny yes.. I want to implement RMQ solution of it in O(nlogk) not O(nlogn).
On Fri, Jul 1, 2011 at 4:38 PM, sunny agrawal <[email protected]>wrote: > is J-I = K for all queries? > > On Fri, Jul 1, 2011 at 4:08 PM, oppilas . <[email protected]>wrote: > >> For finding maximum in a given range for an array , we need to construct a >> seg tree of hight log(n). >> So, for n queries out time complexity will be O(nlogn). >> >> Now, if out query window size is known before hand, suppose j-i==K, how >> can I reduce the complexity to (nlogK for finding an minimum for a given >> range.)? >> I am unable to code it actually. Can anyone please help. >> >> PS: I want to solve it using RMQ only. So please reply considering that. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > Sunny Aggrawal > B-Tech IV year,CSI > Indian Institute Of Technology,Roorkee > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
