Skip to content

Commit 1a70a93

Browse files
committed
docs: update readme with more details
1 parent 57536ed commit 1a70a93

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

readme.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
# Dynamic programming binary search tree
1+
# OBST dynamic programming in python
2+
3+
Implementation of Optimal Binary Search Tree with the use of dynamic programming, written in Python.
4+
5+
## Main problem
6+
The main focus is to implement OBST with use of dynamic programming (no recursion) based on the dictionary.txt file that contains list of English words with their frequency.
7+
8+
Accepted words for the tree are words with frequency > 50k and we are taking the words in alphabetical order.
9+
10+
## Subproblems
11+
### Number of comparisons
12+
In the numOfComparisons.py there is implemented function to find the number of needed comparisons for finding the word. One comparison == one level of the tree.
13+
14+
Number of comparisons for the root is equal to one.
15+
16+
## Running the program
17+
After running the program, first the tree gets printed out to the console (first 10 levels). Then the program waits for user input to enter the word to find answer for Number of comparisons subproblem.
18+
19+
To run the program, execute the following command:
20+
```
21+
python main.py
22+
```

0 commit comments

Comments
 (0)