It's time.
I struggled with LeetCode - Meeting Rooms III; I did eventually get it to be performant enough, but my solution was all wrong- apparently I needed to use two MinHeaps.
Which lead to the question, what the hell is a MinHeap?
So, in this repo, I'm gonna learn data structures and algorithms by implementing them and hoping that'll work.
I don't know exactly what to cover, but I've been watching some videos and doing some reading, so we'll do something like:
- Array
- Linear search to find element
- Fixed length sliding window to find sequence of known length
- Variable length sliding window to find longest sequence of repeating pattern
- Hash Set (using builtins vs from scratch)
- Remove duplicates from array
- Hash Map (using builtins vs from scratch)
- Count occurrence of strings in array
- Linked List
- Reverse a singly-linked list
- Rotate a singly-linked list
- Find the middle of linked list (two pointer technique)
- Create a doubly-linked list
- Create a stack from a doubly-linked list
- Create a queue from a doubly-linked list
- Binary Tree
- Get deepest binary tree path (using a queue)
- Get broadest binary tree level
- Invert binary tree
- Heap
- Create a min heap
- Create a max heap
- Create a min priority queue
- Problems
- Find longest substring without repeating characters (sliding window and hash set)
- Design a LRU cache (hash map and doubly linked list)
- Implement shortest path algorithm for a social network (graph traversal and Dijkstra's algorithm)
- Rotate a binary tree?
- Balance a binary tree?