Skip to content

andy489/Data_Structures_and_Algorithms

Repository files navigation

       

Content

FMI Data Structures and Algorithms

        N         local Tags Problem Statement                         Solution                                                      
Week 15 Back to Content
168 05 BFS, Graph, Traversals, Exam Shortest Tour Solution.cpp
167 04 Tree, Traversals, Exam Profile of a Tree Solution.cpp
166 03 Graph, Traversals, Exam Counting Areas Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
Solution–3 (dsu).cpp
165 02 Searching, Exam Find Element Solution–1 (binary search).cpp
Solution–2 (bounds).cpp
164 01 Graph, Traversals, Exam Road Check Solution–1 (adj matrix).cpp
Solution–2 (adj list).cpp
Solution–3 (dfs).cpp
Week 14 Back to Content
163 04 Graph, Traversals, Exam Cycle Detector in DG Solution–1 (dfs coloring).cpp
Solution–2 (bfs-Kahn).cpp
Solution–3 (top sort).cpp
Solution–4 (backtrack).cpp
162 03 Set, Exam Dundee the Crocodile Solution–1.cpp
Solution–2.cpp
Solution–3.cpp
161 02 Tree, Exam Tree Operations (Part II) Solution.cpp
160 01 Tree, Exam Tree Operations (Part I) Solution–1 (recursive).cpp
Solution–2 (iterative).cpp
Week 13 Back to Content
159 04 Tree, Traversal Swap Nodes in BT Solution–1 (bfs).cpp
Solution–2 (dfs)
158 03 DFS, Graph, Traversals Frog in Maze Solution.cpp
157 02 (Special) BFS, Graph, Traversals Rust and Murdered Solution.cpp
156 01 Combinatorics, Graph, Traversals Journey to the Moon Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
Solution–3 (dsu).cpp
Week 12 Back to Content
155 07 Data Structures, Cactus Graph E. Cactus
E. Cactus Explained
Solution–1 (sparse table, lca).cpp
Solution–2.cpp
154 06 Directing Edges, Graph Street Directions – UVA Solution.cpp
153 05 Bridges, Graph, Directing Edges Bertown Roads Solution.cpp
152 04 Articulation Points, Bridges, Graph Articulation Points and Bridges Solution.cpp
151 03 Articulation Points, Graph Submerging Islands Solution.cpp
150 02 Bridges, Graph, Traversals Critical Edges
DFS Spanning Tree, Back Edges – Visualized
Solution (tarjan).cpp
Edge classification.cpp
149 01 Graph, Traversals C. Dijkstra? Solution.cpp
Week 11 Back to Content
148 05 Euler Cycle, Graph, Traversals CSES - Mail Delivery Solution (dfs).cpp
147 04 Tree, Traversals Longest Path Solution–1 (dfs).cpp
Solution–2 (diameter).cpp
Solution–3 (dfs).cpp
146 03 Implementation Max-Sum-Subarray Solution.cpp
145 02 Graph, Traversals Minimum Penalty Path Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
Solution–3 (dsu.cpp)
144 01 Set Beautiful Pairs Solution.cpp
Week 10 Back to Content
143 04 Data Strucutres, Graph, Tree, HW–08 Kruskal (MST): Really Special Subtree Solution(dsu).cpp
142 03 Data Structures, Graph, HW–08 Blocked Roads Solution (dsu).cpp
141 02 DP, Graph, Traversals, HW–09 Floyd: City of Binding Lights Solution (Floyd-Warshall).cpp
140 01 Graph, Tree, MST, HW–09 Minimal Forest Solution (Kruskal+dsu).cpp)
Week 09 Back to Content
139 07 DAG, Graph, Traversals, HW–08 Bonus: BDZ Solution–1 (top sort--Kahn).cpp
Solution–2 (dp memoization)
138 06 Graph, Searching, Traversals, HW–08 Bonus: Tunnel Maps Solution.cpp
137 05 Graph, Traversals, HW–08 Discos; Two Sets Solution.cpp
136 04 Graph, Traversals, HW–08 Maze Escape Solution–1.cpp
Solution–2.cpp
135 03 Graph, HW–08 Christmas Decoration Solution–1 (dfs).cpp
Solution–2 (bfs).cpp
Solution–3 (hash table).cpp
134 02 Graph, Traversals, HW–08 Christmas Markets Solution–1 (dfs).cpp
Solution–2 (bfs).cpp
133 01 Graph, Traversals Dijkstra: Shortes Reach Solution.cpp
Week 08 Back to Content
132 13 Implementation, Mathematics, Stack Egyptian Fractions Solution.cpp
131 12 Graph, Traversals, Control Test Green School Solution.cpp
130 11 Hash Table, Control Test Toll Tax Solution.cpp
129 10 Graph, Traversals Roads and Libraries Solution.cpp
128 09 Graph, Traversals API Solution (backtrack).cpp)
127 08 Tree, Control Test Edge Removal Solution–1 (dfs).cpp
Solution–2.cpp
126 07 BFS, DFS, Graph, Traversals Castle on the Grid Solution.cpp
125 06 DAG, Sorting, Traversals Course Schedule II Solution–1 (dfs coloring).cpp
Solution–2 (Kahn's algo).cpp)
124 05 Graph, Traversals Islands Count Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
123 04 Graph, Traversals DFS: Connected Cell in a Grid Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
122 03 Graph, Traversals BreadthFirst Search: Shortest Reach Solution.cpp
121 02 Graph, Traversals Snakes and Ladders Solution.cpp
120 01 BFS, DFS, Graph, Traversals Components in a Graph Solution–1 (dfs).cpp
Solution–2 (bfs).cpp
Solution–3 (dsu).cpp
Week 07 Back to Content
119 09 Implementation Keys and Rooms Solution.cpp
118 08 Data Structures, Implementation, Hash Table, Queue, Set Schedules Solution–1 (multiset).cpp
Solution–2 (heap).cpp
Solution–2 (queue).cpp
117 07 Queue Commandos Solution.cpp
116 06 Data Structures, Hash Table, HW–07 Bonus: Text Contents Solution–1 (single rolling hash).cpp
Solution–2 (double rolling hash).cpp
Solution–3 (experimental lib).cpp
115 05 Implementation, Tree, HW–07 File System Solution–1.cpp)
Solution–2.cpp
114 04 Hash Table, HW–07 Grand Hotel Solution.cpp
113 03 Tree, HW–07 Autocomplete Suggestions Solution–1 (Trie).cpp
Solution–2 (sorted array).cpp
112 02 Hash Table, Set Administration Solution.cpp
111 01 Greedy, Best Optimal Opponent One-Dimensional Battle Ships Solution–1 (binary search).cpp
Solution–2 (dsu).cpp
Solution–3 (set).cpp
Week 06 Back to Content
110 16 Tree Mr. X and His Shots Solution–1 (bounds).cpp
Solution–2 (marking).cpp
109 15 Tree Huffman Decoding Solution.cpp
108 14 Tree Is this a BST? Solution–1 (inorder).cpp
Solution–2 (recursive).cpp
107 13 Greedy, Queue Minimum Number of Refueling Stops Solution.cpp
Solution.java
106 12 Queue k-th Largest Element in a Stream Solution.cpp
105 11 Graph, Constol Test Online Market 2 Solution.cpp
104 10 Hash Table, Control Test Online Market 1 Solution.cpp
103 09 Greedy, HW–06 Bonus: 94 Solution–1 (heap).cpp
Solution–2 (multiset).cpp
Solution–3 (flow).cpp
102 08 Greedy, Queue, HW–06 Closest Apartments Solution.cpp
101 07 Tree, Queue, HW–06 Elitism (Running Median) Solution–1 (heap).cpp
Solutoon–2 (multiset).cpp
100 06 Tree, HW–06 Attacking Vigorously the Leaderboards Solution.cpp
099 05 Tree Valid BST Solution.cpp
098 04 Tree Self-Balancing AVL Tree Solution.cpp
097 03 Tree k-th Ancestor Solution (slow).cpp
096 02 Tree Top View Solution.cpp
095 01 Tree Height of a BT Hackerrank Solution.cpp
Week 05 Back to Content
094 24 Tree Penultimate Descendants Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
093 23 Tree Print Specific Level Solution–1 (bfs).cpp
Solution–2(dfs).cpp
092 22 Tree Tree Specific Print Solution.cpp
091 21 Tree Delete Node in a BST Solution.cpp
090 20 Tree k-th Smallest Element in BST Solution–1.cpp
Solution–2.cpp
089 19 Tree Symmetric Tree Solution.cpp
088 18 Tree Height of BT Solution.cpp
087 17 Tree Sum Level Rows Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
086 16 Tree Worry Beads Solution–1 (bfs).cpp
Solution–2 (dfs).cpp
085 15 Tree Falling Leaves Solution.cpp
084 14 Tree Left–Right Solution–1 (bfs).cpp
Solution–2 (recursive).cpp
083 13 Tree RLD (Right–Left_Data Traversal Solution.cpp
082 12 Tree Lowest Common Ancestor in BST Solution–1.cpp
Solution–2.cpp
081 11 Tree Is this a Binary Search Tree? Solution–1 (iterative).cpp
Solution–2 (recursive).cpp
080 10 Tree Binary Search Tree – Insertion Solution.cpp
079 09 Tree Level Order Traversal in BT Solution.cpp
078 08 Data Structures, Queue, HW–05 Bonus Min-Max Intervals Solution–1.cpp
Solution–2.cpp
077 07 Data Structures, Implementation, Queue, HW–05 Student's Queue Solution–1.cpp
Solution–2.cpp
076 06 BFS, HW–05 Rotten from the Core Solution–1.cpp
Solution–2.cpp
Solution–3.cpp
075 05 Tree, HW–05 Los Binares Solution.cpp
074 04 Queue Magic Numbers Solution.cpp
073 03 BFS Labyrinth Solution.cpp
072 02 Linked List Lilly's Stone Path Solution.cpp
071 01 Linked List, Mathematics Josephus Problem Solution–1 (linked list).cpp
Solution–2 (bitwise).cpp
Solution–3 (calculus).cpp
Week 04 Back to Content
070 19 Implementation, Stack Hikers Solution.cpp
069 18 Queue Remove Min Elements in Queue Solution.cpp
068 17 BFS Shortest Path in Maze Solution.cpp
067 16 Queue Hamming Numbers (Ugly Numbers) Solution.cpp
066 15 Implementation, HW–04 Optimal Teams Solution–1.cpp
Solution–2.cpp
065 14 Stack, HW–04 Welcome to the Jungle Solution–1.cpp
Solution–2.cpp
064 13 Stack, HW–04 Truck Ordering Solution–1.cpp
Solution–2.cpp
063 12 Linked List, HW-04 Reverse Linked List Solution–1 (iterative).cpp
Solution–2 (recursive).cpp
Solution–1 (iterative).java
Solution–2 (recursive).java
062 11 Linked List, HW–04 Merge Two Sorted Linked Lists Solution.cpp
061 10 Linked List, HW–04 Delete a Node Solution.cpp
060 09 Linked List, HW–04 Node at Position Solution.cpp
059 08 Stack Max Element in Stack Solution.cpp
058 07 Linked List Smurfieta's Writing Solution.cpp
057 06 Linked List Pistols Solution.cpp
056 05 Implementation, Linked List Cloning Snowmen Solution.cpp
055 04 Linked List List Pairs Solution.cpp
054 03 Linked List Min-Max-Sum Solution.cpp
053 02 Linked List Singly Linked List Solution.cpp
052 01 Linked List, Control Test Divided by Solution.cpp
Week 03 Back to Content
051 11 Searching Hackerland Radio Transmitters Solution.cpp
050 10 Searching Determine existance of two elements with given difference Solution.cpp
049 09 Searching, HW–03 Monster Trucks Solution–1 (binary search).cpp
Solution–2 (ternary search).cpp
Solution–3.cpp
048 08 Searching, HW–03 Baloons and Candy Solution–1.cpp
Solution–2.cpp
Solution–3.cpp
047 07 Searching, HW–03 Cows Solution–1.cpp
Solution–2.cpp
046 06 Searching, HW–03 Strawberries Solution–1.cpp
Solution–2.cpp
Solution–3 (build-in func).cpp
045 05 ? Gems ?
044 04 Searching Building Alignment Solution (ternary search).cpp
043 03 Implementation, Searching Drying Clothes Solution.cpp
042 02 Implementation, Searching, Selection Searching for Index Solution (quick select).cpp
041 01 Implementation, Recursion Chocolate Chip Coockies Solution.cpp
Week 02 Back to Content
040 26 Searching Upper–Lower Bounds Solution.cpp
039 25 Searching Office Printers Solution.cpp
038 24 Searching Binary Search on Answer (Square Root) Solution.cpp
037 23 Searching Pair Sum Solution.cpp
036 22 Searching Binary Search Solution–1 (most left-right).cpp
Solution–2 (recursive).cpp
035 21 Searching, Sorting Pairs Solution.cpp
034 20 Sorting Sorting Floating Point Numbers via Counting Sort Solution.cpp
033 19 Counting Sort, Control Test Sort Array Solution.cpp
032 18 Sorting Visualize Sorting By Pivoting Solution.cpp
031 17 Sorting Visualize Sorting By Merging Solution.cpp
030 16 Searching, Sorting The Jeweller's Problems Solution.cpp
029 15 Searching, Sorting Quick Select Solution.cpp
028 14 Greedy, Sorting, HW–02 Events Solution–1.cpp
Solution–2.cpp
027 13 Sorting, HW–02 Electrical Energy Solution–1.cpp
Solution–2.cpp
026 12 Sorting, HW–02 Monster world Solution–1.cpp
Solution–2.cpp
025 11 Counting, HW–02 Permutations Solution–1.cpp
Solution–2.cpp
024 10 Sorting Software Regulation Solution–1 (slow).cpp
Solution–2 (fast).cpp
023 09 Greedy, Sortings Scrooge's Gift Solution–1.cpp
Solution–2.cpp
022 08 Counting String Arrangement Solution.cpp
021 07 Seraching, Sorting Shoe Shopping Solution.cpp
020 06 Sorting Couplers Password Solution–1.cpp
Solution–2 (short).cpp
019 05 Sorting Tim Sort Solution.cpp
018 04 Sorting Radix Sort Solution.cpp
017 03 Sorting Quick Sort (Random/Middle Pivot) Solution.cpp
016 02 Sorting Count Inversions via Merge Sort Solution–1.cpp
Solution–2.cpp
015 01 Sorting Merge Sort Solution–1 (classic).cpp
Solution–2 (short).cpp
Week 01 Back to Content
014 14 Counting, Stripe Interview First Missing Positive Solution.cpp
013 13 Implementation, Recursion Palindrome Sentence Check Solution.cpp
012 12 Searching Climbing The Leaderboard Solution.cpp
011 11 Brute Force, Implementation, HW–01 Darts 501 Solution–1.cpp
Solution–2.cpp
Solution–3 (recursive).cpp
010 10 Mathematics, HW–01 Cloning Socks Solution–1 (induction).cpp
Solution–2 (formula).cpp
009 09 Greedy, Implementation, HW–01 Watter Supplies Solution–1.cpp
Solution–2.cpp
008 08 Implementation, HW–01 SDA Mission Solution–1.cpp
Solution–2.cpp
007 07 Implementation, HW–01 Encoding Password Solution–1.cpp
Solution–2.cpp
006 06 Recursion, Brute Force The Power Sum Solution–1 (recursive).cpp
Solution–2 (generate).cpp
005 05 Implementation Super Reduced String Solution–1.cpp
Solution–2 (short).cpp
004 04 Counting Palindromic Permutation Solution.cpp
003 03 Sorting Pipi's Socks Solution.cpp
002 02 Counting Substring Permutations Solution.cpp
001 01 Greedy Store Discount Solution.cpp

About

Data structures. Algorithms. Problems and Solutions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages