Skip to content

Commit f2c3b70

Browse files
committed
add tasks description
1 parent bb0c753 commit f2c3b70

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Red–black BST with no extra memory
2+
3+
Describe how to save the memory for storing the color information when implementing a red–black BST
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Document search
2+
3+
Design an algorithm that takes a sequence of `n` document words and a sequence of `m` query words and find the shortest interval in which the `m` query words appear in the document in the order given. The length of an interval is the number of words in that interval.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Design a generalized queue data type that supports all of the following operations in logarithmic time (or better) in the worst case.
2+
3+
# - Create an empty data structure.
4+
# - Append an item to the end of the queue.
5+
# - Remove an item from the front of the queue.
6+
# - Return the `i`th item in the queue.
7+
# - Remove the `i`th item from the queue.
8+
9+
# TODO: Implement
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Generalized queue
2+
3+
Design a generalized queue data type that supports all of the following operations in logarithmic time (or better) in the worst case.
4+
5+
- Create an empty data structure.
6+
- Append an item to the end of the queue.
7+
- Remove an item from the front of the queue.
8+
- Return the `i`th item in the queue.
9+
- Remove the `i`th item from the queue.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Design an algorithm that takes a sequence of `n` document words and a sequence of `m` query words and find the shortest interval in which the `m` query words appear in the document in the order given. The length of an interval is the number of words in that interval.
2+
3+
def algorithm(document_words, query_words)
4+
# TODO: Implement the algorithm
5+
end

0 commit comments

Comments
 (0)