WEEK 01 |
- |
- |
- |
- |
lecture 01 |
- |
complexity, data structures and algorithms |
- |
- |
001 |
01 |
greedy |
Store discount |
Solution.cpp |
002 |
02 |
counting |
Substring permutations |
Solution.cpp |
003 |
03 |
sortings |
Pipi's socks |
Solution.cpp |
004 |
04 |
counting |
Palindromic permutation |
Solution.cpp |
005 |
05 |
implementation |
Super reduced string |
Solution 1 (fast).cpp Solution 2.cpp |
006 |
06 |
brute force, recursion |
The power sum |
Solution (recursive).cpp Solution (generate).cpp |
007 |
07 |
hw 01, implementation |
Encoding password |
Solution 1.cpp Solution 2.cpp |
008 |
08 |
hw 01, implementation |
SDA mission |
Solution 1.cpp Solution 2.cpp |
009 |
09 |
hw 01, greedy, implementation |
Water supplies |
Solution 1.cpp Solution 2.cpp |
010 |
10 |
hw 01, math |
Cloning socks |
Solution 1 (induction n).cpp Solution 2.cpp |
011 |
11 |
hw 01, brute force, implementation |
Darts 501 |
Solution 1.cpp Solution 2.cpp Solution 3.cpp |
012 |
12 |
binary search |
Climbing the leaderboard |
Solution.cpp |
013 |
13 |
recursion |
Palindrome word check |
Solution.cpp |
014 |
14 |
counting |
Stripe interview problem |
Solution.cpp |
015 |
15 |
counting |
Game of thrones - I |
Solution.cpp |
WEEK 02 |
- |
- |
- |
- |
lecture 02 |
- |
sorting and searching algorithms |
- |
- |
016 |
01 |
sortings |
Merge sort |
Solution 1 (classic).cpp Solution 2 (short).cpp |
017 |
02 |
sortings |
Merge sort inversions count |
Solution 1.cpp Solution 2.cpp |
018 |
03 |
sortings |
Quick sort (random pivot) |
Solution.cpp |
019 |
04 |
sortings |
Radix sort |
Solution.cpp |
020 |
05 |
sortings |
Tim sort |
Solution.cpp |
021 |
06 |
sortings |
Couples password |
Solution 1.cpp Solution 2 (short).cpp |
022 |
07 |
searching, sortings |
Shoe shopping |
Solution.cpp |
023 |
08 |
counting |
String arrangement |
Solution.cpp |
024 |
09 |
greedy, sortings |
Scrooge's gift |
Solution 1.cpp Solution 2.cpp |
025 |
10 |
sortings |
Software regulation |
Solution 1 (fast).cpp Solution 2 (slow).cpp |
026 |
11 |
hw 02, counting |
Permutations |
Solution 1.cpp Solution 2.cpp |
027 |
12 |
hw 02, sortings |
Monster world |
Solution 1.cpp Solution 2.cpp |
028 |
13 |
hw 02, sortings |
Electrical energy |
Solution 1.cpp Solution 2.cpp |
029 |
14 |
hw 02, greedy, sortings |
Events |
Solution 1.cpp Solution 2.cpp |
030 |
15 |
searching, sortings |
Quick select |
Solution.cpp |
031 |
16 |
searching, sortings |
The jeweller problems |
Solution.cpp |
032 |
17 |
sortings |
Visualise sorting by merging |
Solution.cpp |
033 |
18 |
sortings |
Visualise sorting by pivoting |
Solution.cpp |
034 |
19 |
control test, counting sort |
Control test 01 |
Solution.cpp |
035 |
20 |
counting, sortings |
Counting sort (float) |
Solution.cpp |
036 |
21 |
searching, sortings |
Pairs |
Solution.cpp |
037 |
22 |
binary search |
Binary search |
Solution 1 (most left/right pos).cpp Solution 2 (recursive).cpp |
038 |
23 |
searching |
Pair sum |
Solution.cpp |
039 |
24 |
binary search |
Sqrt (binary search on answer) |
Solution.cpp |
040 |
25 |
binary search |
Office printers |
Solution.cpp |
041 |
26 |
binary search |
Upper/Lower bound |
Solution.cpp |
WEEK 03 |
- |
- |
- |
- |
lecture 03 pt.1 lecture 03 pt.2 |
|
searching algorithms, linked lists |
- |
- |
042 |
01 |
implementation, recursion |
Chocolate chip cookies |
Solution.cpp |
043 |
02 |
implementation, quick select |
Searching for index |
Solution.cpp |
044 |
03 |
binary search, implementation, searching |
Drying clothes |
Solution.cpp |
045 |
04 |
binary search, ternary search |
Building alignment |
Solution.cpp |
046 |
05 |
greedy, sortings |
Gems |
Solution.cpp |
047 |
06 |
hw 03, binary search |
Strawberries |
Solution 1.cpp Solution 2.cpp |
048 |
07 |
hw 03, binary search |
Cows |
Solution 1.cpp Solution 2.cpp |
049 |
08 |
hw 03, binary search |
Balloons and candy |
Solution 1.cpp Solution 2.cpp Solution 3.cpp |
050 |
09 |
hw 03, binary search, ternary search |
Monster trucks |
Solution 1 (bs).cpp Solution 2 (ts).cpp Solution 3.cpp |
051 |
10 |
binary search |
Left/Right most |
Solution.cpp |
052 |
11 |
binary search |
Search 2 el with diff |
Solution.cpp |
053 |
12 |
binary search |
Hackerland radio transmitters |
Solution.cpp |
WEEK 04 |
- |
- |
- |
- |
lecture 04 |
- |
stack |
- |
- |
054 |
01 |
linked lists |
Control test 02 |
Solution.cpp |
055 |
02 |
linked lists |
Singly linked list |
Solution.cpp |
056 |
03 |
linked lists |
Min max sum |
Solution.cpp |
057 |
04 |
linked lists |
List pairs |
Solution.cpp |
058 |
05 |
implementation |
Cloning snowmen |
Solution.cpp |
059 |
06 |
linked lists |
Pistols |
Solution.cpp |
060 |
07 |
linked lists |
Smurfieta's writing |
Solution.cpp |
061 |
08 |
stacks |
MAX element in stack |
Solution.cpp |
062 |
09 |
hw 04, linked lists |
Node at pos |
Solution.cpp |
063 |
10 |
hw 04, linked lists |
Delete a node |
Solution.cpp |
064 |
11 |
hw 04, linked lists |
Merge two sorted linked lists |
Solution.cpp |
065 |
12 |
hw 04, linked lists |
Reverse linked list |
Solution 1 (iterative).cpp Solution 2 (recursive).cpp |
066 |
13 |
wh 04, stacks |
Truck ordering |
Solution 1.cpp Solution 2.cpp |
067 |
14 |
hw 04, stacks |
Welcome to the jungle |
Solution 1.cpp Solution 2.cpp |
068 |
15 |
hw 04, implementation |
Optimal teams |
Solution 1.cpp Solution 2.cpp |
069 |
16 |
queues |
Hamming numbers |
Solution.cpp |
070 |
17 |
bfs, wave method |
Shortest path in maze |
Solution.cpp |
071 |
18 |
queues |
Remove min elements in queue |
Solution.cpp |
072 |
19 |
stacks |
Hikers |
Solution.cpp |
WEEK 05 |
- |
- |
- |
- |
lecture 05 pt.1 lecture 05 pt.2 lecture 05 pt.3 |
- |
queues, wave method, non-linear data structures, trees, binary trees |
- |
- |
073 |
01 |
linked lists, math |
Josephus problem |
Solution 1 (linked list).cpp Solution 2 (bitwise).cpp Solution 3 (calculus).cpp |
074 |
02 |
linked lists |
Lilly's stone path |
Solution.cpp |
075 |
03 |
bfs, wave method |
Shortest path in labirinth |
Solution.cpp |
076 |
04 |
queues |
Magic numbers |
Solution.cpp |
077 |
05 |
hw 05, trees |
Los binares |
Solution.cpp |
078 |
06 |
hw 05, bfs, wave method |
Rotten from the core |
Solution 1.cpp Solution 2.cpp Solution 3.cpp |
079 |
07 |
hw 05, implementation, queues, structures |
Student's queue |
Solution 1.cpp Solution 2.cpp |
080 |
08 |
hw 05, structures, queues |
Bonus: Min-Max-Intervals |
Solution 1.cpp Solution 2.cpp |
081 |
09 |
trees |
Level order traversal in BT |
Solution.cpp |
082 |
10 |
trees |
Binary search tree - insertion |
Solution.cpp |
083 |
11 |
trees |
Is this a binary search tree? |
Solution 1.cpp Solution 2 (recursive).cpp |
084 |
12 |
trees |
Binary Search Tree - Lowest Common Ancestor |
Solution 1.cpp Solution 2.cpp |
085 |
13 |
trees |
RLD |
Solution.cpp |
086 |
14 |
trees |
Left-right |
Solution 1 (iterative).cpp Solution 2 (recursive).cpp |
087 |
15 |
trees |
Falling leaves |
Solution.cpp |
088 |
16 |
trees |
Worry beads |
Solution 1 (bfs).cpp Solution 2 (dfs).cpp |
089 |
17 |
trees |
Sum level rows |
Solution 1 (bfs).cpp Solution 2 (dfs).cpp |
090 |
18 |
trees |
Depth of BT |
Solution.cpp |
091 |
19 |
trees |
Symmetric tree |
Solution.cpp |
092 |
20 |
trees |
K-th smallest element in a BST |
Solution 1.cpp Solution 2.cpp |
093 |
21 |
trees |
Delete node in a BST |
Solution.cpp |
094 |
22 |
trees |
Tree specific print |
Solution.cpp |
095 |
23 |
trees |
Print specific level |
Solution 1.cpp Solution 2.cpp |
096 |
24 |
trees |
Penultimate descendants |
Solution 1.cpp Solution 2.cpp |
WEEK 06 |
- |
- |
- |
- |
lecture 06 pt.1 lecture 06 pt.2 (online) |
- |
balanced trees, AVL tree |
- |
- |
097 |
01 |
trees |
Height of a binary tree |
Solution.cpp |
098 |
02 |
trees |
Top view |
Solution.cpp |
099 |
03 |
trees |
K-th ancestor |
Solution.cpp |
100 |
04 |
trees |
Self Balancing Tree (AVL) |
Solution.cpp |
101 |
05 |
trees |
Valid BST |
Solution.cpp |
102 |
06 |
hw 06, trees |
Attacking vigorously the leaderboard |
Solution.cpp |
103 |
07 |
hw 06, trees |
Elitism |
Solution 1 (multiset).cpp Solution 2 (heap).cpp |
104 |
08 |
greedy, heap |
Closest apartments |
Solution.cpp |
105 |
09 |
greedy |
Bonus: 94 |
Solution 1 (author).cpp Solution 2 (multiset).cpp Solution 3 (flow).cpp |
106 |
10 |
hash |
Online market 1 |
Solution.cpp |
107 |
11 |
graphs |
Online market 2 |
Solution.cpp |
108 |
12 |
heap |
K-th largest element in stream |
Solution.cpp |
109 |
13 |
sets |
Dundee the crocodile |
Solution 1.cpp Solution 2.cpp Solution 3.cpp |
110 |
14 |
greedy |
Minimum number of refueling stops |
Solution.cpp |
WEEK 07 |
- |
- |
- |
- |
lecture 07 |
- |
heap |
- |
- |
111 |
01 |
set |
One-Dimensional Battle Ships |
Solution.cpp |
112 |
02 |
hash, set |
Administration |
Solution.cpp |
113 |
03 |
hw 07, trees |
Autocomplete suggestions |
Solution 1 (Trie).cpp Solution 2.cpp |
114 |
04 |
hw 07, hash |
Grand hotel |
Solution.cpp |
115 |
05 |
hw 07, implementation, trees |
File system |
Solution 1.cpp Solution 2.cpp |
116 |
06 |
hw 07, hash |
Bonus: Text contents |
Solution 1 (rolling hash).cpp Solution 2 (experimental).cpp Solution 3 (rolling hash).cpp Solution 4 (secure hash).cpp |
117 |
07 |
heap |
Commandos |
Solution.cpp |
118 |
08 |
implementation |
Schedules |
Solution 1.cpp Solution 2.cpp |
WEEK 08 |
- |
- |
- |
- |
lecture 08 pt.1 lecture 08 pt.2 |
- |
kd-trees |
- |
- |
119 |
01 |
bfs, dfs and similar |
Components in a graph |
Solution 1 (dfs).cpp Solution 2 (bfs).cpp |
120 |
02 |
bfs, graphs |
Snakes and ladders |
Solution.cpp |
121 |
03 |
bfs |
Shortest reach |
Solution 1.cpp Solution 2.cpp Solution 3.cpp |
122 |
04 |
graphs |
Connected cell in a grid |
Solution 1 (bfs).cpp Solution 2 (dfs).cpp |
123 |
05 |
graphs |
Number of Islands |
Solution.cpp |
124 |
06 |
graphs |
Course Schedule II |
Solution 1 (Kahn).cpp Solution 2 (2 color mark).cpp |
125 |
07 |
graphs |
Cycle detector |
Solution 1 (back edge).cpp Solution 2 (topological sort).cpp |
126 |
08 |
bfs, dfs and similar |
Castle on the grid |
Solution.cpp |
127 |
09 |
graphs |
Edge removal |
Solution 1 (dfs).cpp Solution 2.cpp |
128 |
10 |
graphs |
API |
Solution (backtracking).cpp |
129 |
11 |
graphs |
Roads and libraries |
Solution.cpp |
130 |
12 |
hash |
Toll tax |
Solution.cpp |
131 |
13 |
graphs |
Green school |
Solution.cpp |
WEEK 09 |
- |
- |
- |
- |
lecture 09 lecture 10 |
- |
hash table, graphs |
- |
- |
132 |
01 |
graphs |
Dijkstra- shortest reach 2 |
Solution.cpp |
133 |
02 |
hw 08, graphs |
Christmas markets |
Solution 1.cpp Solution 2 (shortest cycle).cpp |
134 |
03 |
hw 08, graphs |
Christmas decoration |
Solution 1 (dfs).cpp Solution 2 (bfs).cpp Solution 3.cpp |
135 |
04 |
hw 08, graphs |
Maze escape |
Solution 1.cpp Solution 2.cpp |
136 |
05 |
hw 08, graphs |
Discos |
Solution.cpp |
137 |
06 |
hw 08, graphs |
Bonus: Tunnel maps |
Solution 1.cpp Solution 2.cpp |
138 |
07 |
hw 08, graphs, dp |
Bonus: BDZ |
Solution 1 (topological sort).cpp Solution 2 (dp, memo).cpp |
WEEK 10 |
- |
- |
- |
- |
lecture 11 lecture 12 lecture 13 |
- |
Dijkstra's shortest path in graph algorithm, Kruskal algorithm (minimal spanning tree), {P, NP, NP-Complete} |
- |
- |
139 |
01 |
hw 09, graphs |
Minimal forest |
Solution.cpp |
140 |
02 |
hw 09, graphs |
Floyd - City of blinding lights |
Solution.cpp |
141 |
03 |
hw 09, graphs, disjoint set |
Blocked roads |
Solution (disjoint set).cpp |
142 |
04 |
hw 09, graphs |
Kruskal (MST) - Really Special Subtree |
Solution.cpp |
WEEK 11 |
- |
- |
- |
- |
lecture 14 |
- |
summary |
- |
- |
EXAM 24.01.20 |
- |
- |
- |
- |
143 |
01 |
graphs |
Road check |
Solution 1 (adj matrix).cpp Solution 2 (adj list).cpp Solution 3 (dfs).cpp |
144 |
02 |
binary search |
Find element |
Solution 1 (binary search).cpp Solution 2 (bounds).cpp |
145 |
03 |
graphs |
Counting areas |
Solution 1 (bfs).cpp Solution 2 (dfs).cpp |
146 |
04 |
trees |
Profil of a tree |
Solution (lvl order traversal).cpp |
147 |
05 |
graphs |
Shortest tour |
Solution (bfs).cpp |