Questions tagged [rmq]

Given an array A[1,n] of n objects taken from a well-ordered set (such as numbers), a Range Minimum Query (or RMQ) from i to j asks for the position of a minimum element in the sub-array A[i,j].

Given an array A[1,n] of n objects taken from a well-ordered set (such as numbers), a Range Minimum Query (or RMQ) from i to j asks for the position of a minimum element in the sub-array A[i,j].

More info: Wikipedia

67 questions
0
votes
1 answer

Cannot find template 'rmq-template'

I am trying to get started with RMQ but getting this error while creating my app. I followed the instructions of installing the gem and then creating a project. Where should I get the necessary rmq-template from? ~/motionapps $ ruby --version ruby…
Ethan
  • 315
  • 1
  • 3
  • 8
0
votes
1 answer

Pseudo Range Minimum Query

I have a problem with my assignment which requires me to solve a problem that is similar to range-minimum-query. The problem is roughly described below: I am supposed to code a java program which reads in large bunch of integers (about 100,000) and…
Donald
  • 1,300
  • 2
  • 13
  • 29
0
votes
2 answers

Range Minimum Query basics

I read the wikipedia link on Range Minimum Queries, looked at a couple more tutorials (topcoder and other links) but I have a very basic question: Formal definitino of RMQ is : Given an array of objects taken from a well-ordered set (such as…
user999755
  • 235
  • 1
  • 3
  • 12
-1
votes
1 answer

Why/When do we use segment trees for range minimum query?

I read that for implementation of range minimum queries using segment trees, it takes O(n) time for preprocessing and O(log(n)) time to find the solution for each query. It requires extra space too. If instead we simply, find the minimum for a…
-1
votes
1 answer

How to implement Binary Search with Range Minimum Query?

Given an Interval say A[i-j], We can easily find out the minimum value in between the Interval A[i-j] using RMQ. Now I'm trying to reverse the Condition,:- Given a minimum, find out the interval(max length) which contains this number as a minimum…
monsterspy
  • 43
  • 5
-1
votes
1 answer

RubyMotion RMQ default global styles

I'd like have default styles for UIViews. Let's say that I want to have ALL UILabel with backgroundColor of color.light_gray. Moreover I want to style my custom UIViews, e.g. for EVERY AttributedUILabel I want to have kerning value set to 2. How to…
Kamil Lelonek
  • 14,592
  • 14
  • 66
  • 90
-2
votes
1 answer

Genomic range query ruby implementation

I took a demo testing and got a result score 62. I guess my code is not efficient enough to achieve the highest score 100. So how to efficiently find lowest character code in a substring? For example, the string is s="ACGTTAGTAC". Find out what's…
canoe
  • 1,273
  • 13
  • 29
1 2 3 4
5