Exercises and Homework for SoftUni's Data Structures February 2016 course, in Python.
Problems with an asterisk (*) are considered hard and optional.
- **Trie Data Struccture
- ****Rope Data Structure
- ****Red-Black Tree RB Tests
- ****B-Tree sloppy implementation that needs refactoring B-Tree Tests
- **Left-Leaning Red-Black Tree
- **AA Tree AA Tree Tests
- **Balanced Ordered Set tests
- ***Calculate Arithmetic Expression - calculate arithmetic expressions using the Shunting Yard Algorithm
- KD-Tree - *Mass Effect Galaxy Map
Overview of the course, introduction to the Big-O notation and why algorithm speed matters.
- Given slow and fast functions, compare their speed.
- Given functions, figure out their Big-O complexity.
Linked List, how a List(Vector) works and how it differs from a traditional array.
- Implement a Double-Linked List
- Get the sum and average of a list of integers
- Sort the words in a list
- Find the longest subsequence of equal numbers in an array
- Remove odd occurrences
- Count of occurrences
- Implement a ReversedList
- Implement a LinkedList
- *Distance in Labyrinth
Analysis of both data structures, their complexities and when to use which.
- Implement a Circular Queue
-
Implement an Array-Based Stack
-
Implement a Linked Stack
-
Implement a Linked Queue
Introduction to Trees, Binary Trees, Balanced Binary Trees(AVL, AA, B, RB) and Graphs
- Implement a tree. tests
- Implement a binary tree. tests
- Play with Trees, a program which can find
- The root node
- All leaf nodes (in increasing order)
- All middle nodes (in increasing order)
- The longest path in the tree (the leftmost if several paths have the same longest length)
- All paths in the tree with given sum P of their nodes (from the leftmost to the rightmost)
- All subtrees with given sum S of their nodes (from the leftmost to the rightmost)
- Traverse Directory - Build a tree from directories and calculate the sum of file sizes.
- ***Calculate Arithmetic Expression - calculate arithmetic expressions using the Shunting Yard Algorithm
In-depth analysis of DFS and BFS
- Find the Root - Figure out if the given graph is a tree and find it's root
- Round Dance - Find the longest 'round dance'
- Ride The Horse - Traverse matrix in a way a horse chesspiece would
- Longest Path In Tree - Find the longest path in a tree from leaf to leaf by the sum of the nodes.
- *Sorting - Each step, take K elements in the array and reverse them. Find the minimum number of such steps to completely sort the array.
Dictionary implementations, how hash-tables work (collision strategies) and set implementations.
Ordered dictionaries, multi-dictionaries, ordered multi-dictionaries, sets, ordered sets, bags, ordered bags, rope.
Learned about AA, AVL and Red-Black trees. Ropes.
Learned about B-Trees, Heaps, Tries, Suffix Trees and Space-Partitioning Trees (Quad Tree, K-d Tree, etc.)
- Implement a Quad Tree