top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Give an efficient algorithm of problem?

0 votes
345 views

We have a long string. We label some substrings with tags.
- A tag entry is [startIndex, endIndex, tag].
- Query: 1 or more tags
- Output: all blocks/ranges with all queried tags.

Example tag entries: [23, 72, 0]
// label [23, 72) with tag 0 [34, 53, 1]
// label [34, 53) with tag 1 [100, 128, 0]

Query and Output: 0 => [23, 72], [100, 128] 0,1 => [34,53]
// [34, 53) matches both tag 0 and 1

Give an efficient algorithm. Please describe your algorithm before posting code.

posted Dec 11, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Cant understand anything, please provide what is the problem statement (Give an efficient algorithm of problem may not be correct problem statement) followed by what you are trying to solve...
Waiting for your update?

Similar Questions
+5 votes

Example :
Let the list be {2,3,5} and Assume always 1 be included then

2th number is 2
3th number is 3
4th number is 4
5th number is 5
6th number is 6
7th number is 8
8th number is 9
9th number is 10
10th number is 12
11th number is 15 and so on...

0 votes

I am looking for the best algorithm to complete tower of hanoi problem along with C/C++ code, any help would be great support for my interview?

+1 vote

But when priority(distance) are changed of vertex.So I have to search those vertex in priority queue(MIN heap) which distance are updated.How to find position of that vertex in binary min heap because find operation are not present in binary min heap?

+2 votes

What is Hamming code problem and what is its application. Please explain in detail.

...