Add a plan

This commit is contained in:
Jesse Millwood 2024-10-29 17:06:44 -04:00
parent 1e527ed340
commit ffcd96a6dd

View File

@ -42,3 +42,72 @@ To run the tests:
#+begin_src sh
meson test -C build
#+end_src
* Plan
** Arrays [2/6]
- [X] Is Unique (CTCI: 1.1)
- [X] Check permutation (CTCI: 1.2)
- [ ] String Compression (CTCI: 1.6)
- [ ] Rotate Matrix (CTCI: 1.7)
- [ ] Zero Matrix (CTCI: 1.8)
- [ ] Sliding Window ([[https://www.geeksforgeeks.org/window-sliding-technique/][GfG: Sliding Window Technique]])
** Linked Lists [1/6]
- [X] Remove Duplicates (CTCI: 2.1)
- [ ] Return Kth to Last (CTCI: 2.2)
- [ ] Delete middle node (CTCI: 2.3)
- [ ] Partition (CTCI: 2.4)
- [ ] Loop Detection (CTCI: 2.8)
** Stacks and Queues [0/2]
- [ ] Stack Min (CTCI: 3.1)
- [ ] Sort Stack (CTCI: 3.5)
** Trees and Graphs [4/9]
- [X] Implement binary tree object
- Insert breadth first
- [X] Recursive Pre-order traversal
- [X] Recursive In-order traversal
- [X] Recursive Post-order traversal
- [ ] Non-Recursive Pre-order traversal
- [ ] Non-Recursive In-order traversal
- [ ] Non-Recursive Post-order traversal
- [ ] Min Heap
- [ ] Binary Search
** C/C++ [2/5]
- [X] Code as static library
- [X] Templates
- [ ] Inheritance, base/parent classes
- [ ] Smart pointers
- [ ] Threads and locks
** CTCI Advanced
- [ ] LRU Cache (CTCI: 16.25)
- Design and build a "least recently used" cache, which evicts the least
recently used item. The cache should map from keys to values (allowing you
to insert and retrieve a value associated with a particular key) and be
initialized with a max size. When it is full, it should evict the least
recently used item.
** CTCI Hard
- [ ] Baby Names (CTCI: 17.7)
- Each year, the government releases a list of the 10000 most common baby
names and their frequencies (the number of babies with that name). The only
problem with this is that some names have multiple spellings. For
example,"John" and ''.Jon" are essentially the same name but would be listed
separately in the list. Given two lists, one of names/frequencies and the
other of pairs of equivalent names, write an algorithm to print a new list
of the true frequency of each name. Note that if John and Jon are synonyms,
and Jon and Johnny are synonyms, then John and Johnny are synonyms. (It is
both transitive and symmetric.) In the final list, any name can be used as
the "real" name.
- EXAMPLE
- Input:
- Names: John(15),Jon(12), Chris(13),Kris(4),Christopher(19)
- Synonyms:(Jon,John),(John,Johnny),(Chris,Kris),(Chris, Christopher)
- Output: John(27), Kris(36)
- [ ] Continuous Median (CTCI: 17.20)
- Numbers are randomly generated and passed to a method. Write a program to
find and maintain the median value as new values are generated.
- [ ] Volume of Histogram (CTCI: 17.21)
- Imagine a histogram (bar graph). Design an algorithm to compute the volume of water it could hold if someone poured water across the top. You can assume that each histogram bar has width 1.
- EXAMPLE
- (Black bars are the histogram. Gray is water.)
- Input:{0, 0, 4, 0, 0, 6, 0, 0, 3, 0, 5, 0, 1, 0, 0, 0}
- Book has an image here
- Output:26