Kadane algorithm is used to find the maximum sum subarray in an array and maximum sum subarray problem is the task of finding a contiguous subarray with the largest sum
The simple idea of the algorithm is to search for all positive contiguous segments of the array and keep track of maximum sum contiguous segment among all positive segments(curr_sum is used for this) Each time we get a positive sum we compare it with max_sum and update max_sum if it is greater than curr_sum
diff --git a/dc/de1/recursive__tree__traversal_8cpp.html b/dc/de1/recursive__tree__traversal_8cpp.html
index 3589f6685..92e236c7e 100644
--- a/dc/de1/recursive__tree__traversal_8cpp.html
+++ b/dc/de1/recursive__tree__traversal_8cpp.html
@@ -155,17 +155,17 @@ Functions
Recursive version of Inorder, Preorder, and Postorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
-
+
Iterative Inorder Traversal of a tree
For traversing a (non-empty) binary tree in an inorder fashion, we must do these three things for every node n starting from the tree’s root:
(L) Recursively traverse its left subtree. When this step is finished, we are back at n again. (N) Process n itself. (R) Recursively traverse its right subtree. When this step is finished, we are back at n again.
In normal inorder traversal, we visit the left subtree before the right subtree. If we visit the right subtree before visiting the left subtree, it is referred to as reverse inorder traversal.
-
+
Iterative Preorder Traversal of a tree
For traversing a (non-empty) binary tree in a preorder fashion, we must do these three things for every node n starting from the tree’s root:
(N) Process n itself. (L) Recursively traverse its left subtree. When this step is finished, we are back at n again. (R) Recursively traverse its right subtree. When this step is finished, we are back at n again.
In normal preorder traversal, visit the left subtree before the right subtree. If we visit the right subtree before visiting the left subtree, it is referred to as reverse preorder traversal.
-
+
Iterative Postorder Traversal of a tree
For traversing a (non-empty) binary tree in a postorder fashion, we must do these three things for every node n starting from the tree’s root:
(L) Recursively traverse its left subtree. When this step is finished, we are back at n again. (R) Recursively traverse its right subtree. When this step is finished, we are back at n again. (N) Process n itself.
diff --git a/dd/d47/namespacemath.html b/dd/d47/namespacemath.html
index c19847630..add1e4193 100644
--- a/dd/d47/namespacemath.html
+++ b/dd/d47/namespacemath.html
@@ -276,7 +276,7 @@ Functions
for std::cin and std::cout
Mathematical algorithms
Given a recurrence relation; evaluate the value of nth term. For e.g., For fibonacci series, recurrence series is f(n) = f(n-1) + f(n-2) where f(0) = 0 and f(1) = 1. Note that the method used only demonstrates recurrence relation with one variable (n), unlike nCr problem, since it has two (n, r)
-
+
Algorithm
This problem can be solved using matrix exponentiation method.
See also here for simple number exponentiation algorithm or explaination here .
Author Ashish Daulatabad for assert for IO operations for std::vector STL
diff --git a/dd/d92/memory__game_8cpp.html b/dd/d92/memory__game_8cpp.html
new file mode 100644
index 000000000..bb77085a6
--- /dev/null
+++ b/dd/d92/memory__game_8cpp.html
@@ -0,0 +1,942 @@
+
+
+
+
+
+
+
+
Algorithms_in_C++: games/memory_game.cpp File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
A simple Memory Game with 3 different sizes and multiple letters.
+More...
+
#include <algorithm>
+#include <cstdlib>
+#include <ctime>
+#include <iostream>
+#include <random>
+#include <vector>
+#include <unistd.h>
+
+
+template<typename T >
+constexpr T SLEEP (T seconds)
+ for sleep()
+
+template<typename T >
+bool games::memory_game::is_number (const T &input)
+ Utility function to verify if the given input is a number or not. This is very useful to prevent the program being stuck in a loop.
+
+template<typename T >
+void games::memory_game::init (std::vector < T > *table)
+ Initializes the table with the letters.
+
+template<typename T >
+void games::memory_game::print_table (const std::vector < T > &table)
+ Utility function to print the table.
+
+template<typename T >
+void games::memory_game::reset_data (const std::vector < T > &table, int *answer, int *old_answer, int *memory_count)
+ Utility function that resets the data if the user enters an invalid value.
+
+template<typename T >
+void games::memory_game::ask_data (const std::vector < T > &table, int *answer, int *old_answer, int *memory_count)
+ Function that asks the user for their input in the table they previously chose.
+
+template<typename T >
+bool games::memory_game::match (const std::vector < T > &table, std::vector < T > *table_empty, const int &answer, bool *first_time, int *old_answer, int *memory_count)
+ Checks if the two values given by the user match.
+
+template<typename T >
+void games::memory_game::assign_results (std::vector < T > *table_empty, std::vector < T > *table, int *answer, bool *first_time, int *old_answer, int *memory_count)
+ Function to assign the results to the table.
+
+int main ()
+ Main function.
+
+
+
+
A simple Memory Game with 3 different sizes and multiple letters.
+
The game consists on finding the pair of all the given letters depending on the table size. Once all of the instances are all found, the game will end and will ask you if you'd like to play again or not.
+
It provides 3 different sizes available that the user can choose (4x2, 5x2, 7x2). 7x2 being the biggest table size and hardest mode. The bigger the size, the more letters are available .
+
Author David Leal
+
+
+
◆ ask_data()
+
+
+
+
+template<typename T >
+
+
+ void games::memory_game::ask_data
+ (
+ const std::vector < T > &
+ table ,
+
+
+
+
+ int *
+ answer ,
+
+
+
+
+ int *
+ old_answer ,
+
+
+
+
+ int *
+ memory_count
+
+
+
+ )
+
+
+
+
+
+
Function that asks the user for their input in the table they previously chose.
+
Template Parameters
+
+ T The type of the table.
+
+
+
+
Parameters
+
+ table The table that's used to get the user's input and data.
+ answer The user's answer.
+ old_answer The user's previous answer.
+ memory_count A counter to check if the user has already answered two values.
+
+
+
+
Returns void
+
162 {
+
163 (*old_answer) = (*answer);
+
+
165
+
166 std::cout <<
"\n\nType your response here (number index):\n" ;
+
+
168
+
+
170 std::cout <<
"\nYou must enter a valid number.\n\n" ;
+
171 reset_data (table, answer, old_answer, memory_count);
+
172 }
+
173
+
174
+
175
+
176 (*memory_count)++;
+
177
+
178 if (((*answer) > table.size()) || ((*answer) < 1)) {
+
179 std::cout <<
"\nYou can't check a value that doesn't exist (or an "
+
180 "invalid number).\n\n" ;
+
181 reset_data (table, answer, old_answer, memory_count);
+
182 }
+
183
+
184 if ((*old_answer) == (*answer)) {
+
185 std::cout <<
"\nYou can't check the same value twice.\n\n" ;
+
186 reset_data (table, answer, old_answer, memory_count);
+
187 }
+
188
+
189
+
190
+
191
+
192 if ((table[(*answer) - 1] != 0) &&
+
193 ((table[(*old_answer)] == 0) || (table[(*old_answer)] != 0))) {
+
194 std::cout <<
"\nYou can't check the same value twice.\n\n" ;
+
195 reset_data (table, answer, old_answer, memory_count);
+
196 }
+
197 }
+
+
+
bool is_number(const T &input)
Utility function to verify if the given input is a number or not. This is very useful to prevent the ...
Definition: memory_game.cpp:62
+
void print_table(const std::vector< T > &table)
Utility function to print the table.
Definition: memory_game.cpp:123
+
void reset_data(const std::vector< T > &, int *, int *, int *)
Utility function that resets the data if the user enters an invalid value.
Definition: memory_game.cpp:211
+
+
+
+
+
+
+
◆ assign_results()
+
+
+
+
+template<typename T >
+
+
+ void games::memory_game::assign_results
+ (
+ std::vector < T > *
+ table_empty ,
+
+
+
+
+ std::vector < T > *
+ table ,
+
+
+
+
+ int *
+ answer ,
+
+
+
+
+ bool *
+ first_time ,
+
+
+
+
+ int *
+ old_answer ,
+
+
+
+
+ int *
+ memory_count
+
+
+
+ )
+
+
+
+
+
+
Function to assign the results to the table.
+
Also checkes if the user has answered all the values already, as well as verify if the user made a match or not.
Template Parameters
+
+ T The type of the tables.
+
+
+
+
Parameters
+
+ table_empty The table with no values, slowly assigned from table depending on the user's input.
+ table The table with the original values.
+ answer The user's answer.
+ first_time A boolean to check if the user has already answered a value.
+ old_answer The user's previous answer.
+ memory_count A counter to check if the user has already answered two values.
+
+
+
+
Returns void
+
291 {
+
292
+
293
+
294
+
295 for (int i = 0; i < (*table).size() + 1; i++) {
+
296 if (i == (*answer)) {
+
297 if (
match ((*table), table_empty, (*answer), first_time, old_answer,
+
298 memory_count) == true ) {
+
299 (*table_empty)[i - 1] = (*table)[i - 1];
+
300 (*first_time) = true ;
+
301 }
+
302 }
+
303 }
+
304
+
305 if ((*memory_count) == 1) {
+
306 (*first_time) = false ;
+
307 (*memory_count) = 0;
+
308 }
+
309
+
310 char try_again = 'n' ;
+
311
+
312
+
313
+
314 for (int i = 0; i < (*table).size() + 1; i++) {
+
315 if ((*table_empty)[i] == 0) {
+
316 break ;
+
317 } else if (i == (*table).size() - 1) {
+
+
319
+
320 std::cout <<
"\n\nYou won. Congratulations! Do you want to play "
+
321 "again? (y/n)\n" ;
+
+
323 << "Size " << (*table).size()
+
324 << " will be used. This can be changed by re-running the game." ;
+
+
326 if (try_again == 'y' ) {
+
327
+
328
+
329 for (int i = 0; i < (*table_empty).size(); i++) {
+
330 (*table_empty)[i] = 0;
+
331 }
+
332
+
+
334 } else if (try_again == 'n' ) {
+
335 std::cout <<
"\nThanks for playing the game!\n" ;
+
+
337
+
+
339 } else {
+
340 std::cout <<
"\nInvalid input (exitting...).\n" ;
+
+
342
+
+
344 }
+
345 }
+
346 }
+
347
+
348
+
349 ask_data ((*table_empty), answer, old_answer, memory_count);
+
350 assign_results (table_empty, table, answer, first_time, old_answer,
+
351 memory_count);
+
352 }
+
+
bool match(const std::vector< T > &table, std::vector< T > *table_empty, const int &answer, bool *first_time, int *old_answer, int *memory_count)
Checks if the two values given by the user match.
Definition: memory_game.cpp:235
+
void assign_results(std::vector< T > *table_empty, std::vector< T > *table, int *answer, bool *first_time, int *old_answer, int *memory_count)
Function to assign the results to the table.
Definition: memory_game.cpp:289
+
void ask_data(const std::vector< T > &table, int *answer, int *old_answer, int *memory_count)
Function that asks the user for their input in the table they previously chose.
Definition: memory_game.cpp:161
+
constexpr T SLEEP(T seconds)
for sleep()
Definition: memory_game.cpp:36
+
void init(std::vector< T > *table)
Initializes the table with the letters.
Definition: memory_game.cpp:80
+
+
+
+
+
+
+
◆ init()
+
+
+
+
+template<typename T >
+
+
+ void games::memory_game::init
+ (
+ std::vector < T > *
+ table )
+
+
+
+
+
+
Initializes the table with the letters.
+
Template Parameters
+
+ T The type of the table.
+
+
+
+
Parameters
+
+ table The table to initialize.
+
+
+
+
Returns void
+
80 {
+
+
82
+
83
+
84 if ((*table).size() == 10) {
+
85 letters = {'A' , 'E' , 'Z' , 'P' , 'D' };
+
86 } else if ((*table).size() == 8) {
+
87 letters = {'A' , 'E' , 'Z' , 'D' };
+
88 } else if ((*table).size() == 14) {
+
89 letters = {'A' , 'E' , 'Z' , 'P' , 'D' , 'B' , 'M' };
+
90 }
+
91
+
+
93 for (char letter : letters) {
+
+
+
96 }
+
97
+
+
+
100
+
101 for (int i = 0; i < (*table).size(); i++) {
+
102 (*table)[i] = pairs[i];
+
103 }
+
104
+
105 std::cout <<
"All available types are: " ;
+
106
+
107 for (int i = 0; i < letters.size(); i++) {
+
108 if (i == letters.size() - 1) {
+
109 std::cout <<
"and " << letters[i] <<
".\n\n" ;
+
110 } else {
+
+
112 }
+
113 }
+
114 }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
◆ is_number()
+
+
+
+
+template<typename T >
+
+
+ bool games::memory_game::is_number
+ (
+ const T &
+ input )
+
+
+
+
+
+
Utility function to verify if the given input is a number or not. This is very useful to prevent the program being stuck in a loop.
+
Template Parameters
+
+ T The type of the input
+
+
+
+
Parameters
+
+ input The input to check.
+
+
+
+
Returns false if the input IS empty or if it contains a non-digit character
+
+true if the input is NOT empty and if it contains only digit characters
+
62 {
+
+
+
+
66
+
67 return false ;
+
68 }
+
69
+
70 return true ;
+
71 }
+
+
+
+
+
+
+
◆ main()
+
+
+
+
+
+ int main
+ (
+ void
+ )
+
+
+
+
+
+
Main function.
+
Returns 0 on exit
+
< Size of the table.
+
< Selection of the size (4x2, 5x2, 7x2).
+
< The answer (number index) that the user chose.
+
< Previous answer (number index).
+
< Counter to check if the user has already answered two values.
+
< Whether the user has answered 1 value or not (previous answered values do not count).
+
360 {
+
361
+
+
363
+
364 int size = 0;
+
365 int selection = 0;
+
366
+
367 int response = 0;
+
368 int old_answer = 0;
+
369
+
370 int memory_count =
+
371 0;
+
372 bool first_time = true ;
+
373
+
374
+
+
+
377 std::cout << std::is_literal_type<void>::value;
+
378
+
379 do {
+
+
+
+
383
+
+
+
386 } while ((selection < 1 || selection > 3) &&
+
387 (!games::memory_game::is_number(selection)));
+
388
+
389 switch (selection) {
+
390 case 1:
+
391 size = 8;
+
392 break ;
+
393 case 2:
+
394 size = 10;
+
395 break ;
+
396 case 3:
+
397 size = 14;
+
398 break ;
+
399 default :
+
400 size = 10;
+
401 break ;
+
402 }
+
403
+
+
+
406
+
+
408
+
+
+
411 &memory_count);
+
+
413 &first_time, &old_answer, &memory_count);
+
414
+
415 return 0;
+
416 }
+
+
+
+
+
+
+
+
+
+
◆ match()
+
+
+
+
+template<typename T >
+
+
+ bool games::memory_game::match
+ (
+ const std::vector < T > &
+ table ,
+
+
+
+
+ std::vector < T > *
+ table_empty ,
+
+
+
+
+ const int &
+ answer ,
+
+
+
+
+ bool *
+ first_time ,
+
+
+
+
+ int *
+ old_answer ,
+
+
+
+
+ int *
+ memory_count
+
+
+
+ )
+
+
+
+
+
+
Checks if the two values given by the user match.
+
Template Parameters
+
+ T The type of the table.
+
+
+
+
Parameters
+
+ table_empty The table with no values, slowly assigned from table depending on the user's input.
+ table The table with the original values.
+ answer The user's answer.
+ first_time A boolean to check if the user has already answered a value.
+ old_answer The user's previous answer.
+ memory_count A counter to check if the user has already answered two values.
+
+
+
+
Returns true IF the values given by the user match
+
+false if the values given by the user do NOT match
+
237 {
+
238 if ((*first_time) == true ) {
+
239 return true ;
+
240 }
+
241
+
242
+
243
+
244 for (int i = 0; i < table.size() + 1; i++) {
+
245 if (i == answer) {
+
246 if (table[i - 1] == table[(*old_answer) - 1]) {
+
247 (*first_time) = true ;
+
248 (*memory_count) = 0;
+
249
+
250 (*old_answer) = 0;
+
251 return true ;
+
252 } else {
+
253 std::cout <<
"\nNo match (value was " << table[i - 1]
+
254 << ", index is " << i << ").\n\n" ;
+
255
+
256 (*table_empty)[(*old_answer) - 1] = 0;
+
257 (*table_empty)[answer - 1] = 0;
+
258
+
259 (*first_time) = true ;
+
260 (*memory_count) = 0;
+
261
+
262 (*old_answer) = 0;
+
263 return false ;
+
264 }
+
265 }
+
266 }
+
267
+
268 return false ;
+
269 }
+
+
+
+
+
+
+
◆ print_table()
+
+
+
+
+template<typename T >
+
+
+ void games::memory_game::print_table
+ (
+ const std::vector < T > &
+ table )
+
+
+
+
+
+
Utility function to print the table.
+
Template Parameters
+
+ T The type of the table.
+
+
+
+
Parameters
+
+ table The table to print.
+
+
+
+
Returns void
+
123 {
+
+
+
126
+
127 for (int i = 0; i < table.size(); i++) {
+
128 table_print[i] = ' ' ;
+
129
+
130 if (table[i] != 0) {
+
131 table_print[i] = table[i];
+
132 }
+
133 }
+
134
+
135 for (int i = 0; i < table.size(); i++) {
+
136 if (i % 5 == 0 && i != 0) {
+
+
138 }
+
139
+
+
141 }
+
142 }
+
+
+
+
+
+
+
◆ reset_data()
+
+
+
+
+template<typename T >
+
+
+ void games::memory_game::reset_data
+ (
+ const std::vector < T > &
+ table ,
+
+
+
+
+ int *
+ answer ,
+
+
+
+
+ int *
+ old_answer ,
+
+
+
+
+ int *
+ memory_count
+
+
+
+ )
+
+
+
+
+
+
Utility function that resets the data if the user enters an invalid value.
+
Template Parameters
+
+ T The type of the table.
+
+
+
+
Parameters
+
+ table The table that will be used to call ask_data().
+ answer The user's answer.
+ old_answer The user's previous answer.
+ memory_count A counter to check if the user has already answered two values.
+
+
+
+
Returns void
+
212 {
+
213 (*answer) = (*old_answer);
+
214 (*memory_count)--;
+
215
+
216 ask_data (table, answer, old_answer, memory_count);
+
217 }
+
+
+
+
+
+
+
◆ SLEEP()
+
+
+
+
+template<typename T >
+
+
+
+
+
+ constexpr T SLEEP
+ (
+ T
+ seconds )
+
+
+
+
+
+constexpr
+
+
+
+
+
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp.js b/dd/d92/memory__game_8cpp.js
new file mode 100644
index 000000000..1aa4fa91f
--- /dev/null
+++ b/dd/d92/memory__game_8cpp.js
@@ -0,0 +1,12 @@
+var memory__game_8cpp =
+[
+ [ "ask_data", "dd/d92/memory__game_8cpp.html#a5714d97649c0edd57b4fb449799676a3", null ],
+ [ "assign_results", "dd/d92/memory__game_8cpp.html#a3ceeea62d8fa6c563e2c66359fd73413", null ],
+ [ "init", "dd/d92/memory__game_8cpp.html#ad573c8ae66ab66156d03e5e81bbba214", null ],
+ [ "is_number", "dd/d92/memory__game_8cpp.html#a33167bb9cce6d527b478b4f6ae8c3f59", null ],
+ [ "main", "dd/d92/memory__game_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
+ [ "match", "dd/d92/memory__game_8cpp.html#a370760f2b328ad341bcb77d82fa17b01", null ],
+ [ "print_table", "dd/d92/memory__game_8cpp.html#ac589ef65abb0a6b9a7116ee0f9fd5280", null ],
+ [ "reset_data", "dd/d92/memory__game_8cpp.html#adc62ebb75853446656e24932bdc6dd6b", null ],
+ [ "SLEEP", "dd/d92/memory__game_8cpp.html#a5bdc30951221eae9c33413ff9eb574f6", null ]
+];
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.map b/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.map
new file mode 100644
index 000000000..3764190eb
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.md5 b/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.md5
new file mode 100644
index 000000000..b2059d0c8
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.md5
@@ -0,0 +1 @@
+4ed636e96dd0c358622252e10b93fd75
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.svg b/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.svg
new file mode 100644
index 000000000..dcc845d19
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a33167bb9cce6d527b478b4f6ae8c3f59_cgraph.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+games::memory_game::is_number
+
+
+Node1
+
+
+games::memory_game
+::is_number
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.map b/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.map
new file mode 100644
index 000000000..f454046eb
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.md5 b/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.md5
new file mode 100644
index 000000000..d8969e716
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.md5
@@ -0,0 +1 @@
+217e706197afe75db298d514157c1632
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.svg b/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.svg
new file mode 100644
index 000000000..c45b8d554
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a370760f2b328ad341bcb77d82fa17b01_cgraph.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+games::memory_game::match
+
+
+Node1
+
+
+games::memory_game
+::match
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.map b/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.map
new file mode 100644
index 000000000..b034fe53e
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.map
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.md5 b/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.md5
new file mode 100644
index 000000000..0b92675bc
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.md5
@@ -0,0 +1 @@
+f4dc8678658dc1820b9fce062145e8bc
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.svg b/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.svg
new file mode 100644
index 000000000..a2d7f988b
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a3ceeea62d8fa6c563e2c66359fd73413_cgraph.svg
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+games::memory_game::assign_results
+
+
+Node1
+
+
+games::memory_game
+::assign_results
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+games::memory_game
+::ask_data
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node4
+
+
+games::memory_game
+::print_table
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node6
+
+
+games::memory_game
+::init
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
+Node12
+
+
+games::memory_game
+::match
+
+
+
+
+
+Node1->Node12
+
+
+
+
+
+Node13
+
+
+SLEEP
+
+
+
+
+
+Node1->Node13
+
+
+
+
+
+Node2->Node2
+
+
+
+
+
+Node3
+
+
+games::memory_game
+::is_number
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+Node2->Node4
+
+
+
+
+
+Node5
+
+
+games::memory_game
+::reset_data
+
+
+
+
+
+Node2->Node5
+
+
+
+
+
+Node3->Node3
+
+
+
+
+
+Node4->Node4
+
+
+
+
+
+Node5->Node2
+
+
+
+
+
+Node5->Node5
+
+
+
+
+
+Node6->Node6
+
+
+
+
+
+Node7
+
+
+std::vector::begin
+
+
+
+
+
+Node6->Node7
+
+
+
+
+
+Node8
+
+
+std::vector::end
+
+
+
+
+
+Node6->Node8
+
+
+
+
+
+Node9
+
+
+std::vector::push_back
+
+
+
+
+
+Node6->Node9
+
+
+
+
+
+Node10
+
+
+std::shuffle
+
+
+
+
+
+Node6->Node10
+
+
+
+
+
+Node11
+
+
+std::vector::size
+
+
+
+
+
+Node6->Node11
+
+
+
+
+
+Node12->Node12
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.map b/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.map
new file mode 100644
index 000000000..0e8363f1b
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.map
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.md5 b/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.md5
new file mode 100644
index 000000000..332535638
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.md5
@@ -0,0 +1 @@
+a3a5487a61bda538b4c9f0e4889ffdfe
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.svg b/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.svg
new file mode 100644
index 000000000..da40213ad
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_a5714d97649c0edd57b4fb449799676a3_cgraph.svg
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+games::memory_game::ask_data
+
+
+Node1
+
+
+games::memory_game
+::ask_data
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+games::memory_game
+::is_number
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+games::memory_game
+::print_table
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+games::memory_game
+::reset_data
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node2->Node2
+
+
+
+
+
+Node3->Node3
+
+
+
+
+
+Node4->Node1
+
+
+
+
+
+Node4->Node4
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.map b/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.map
new file mode 100644
index 000000000..0b691c7eb
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.md5 b/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.md5
new file mode 100644
index 000000000..097187b42
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.md5
@@ -0,0 +1 @@
+9b7652a984d6cdc8b55ba13fdb9e1348
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.svg b/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.svg
new file mode 100644
index 000000000..b5336c135
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ac589ef65abb0a6b9a7116ee0f9fd5280_cgraph.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+games::memory_game::print_table
+
+
+Node1
+
+
+games::memory_game
+::print_table
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.map b/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.map
new file mode 100644
index 000000000..51d3b555e
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.map
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.md5 b/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.md5
new file mode 100644
index 000000000..9496040c3
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.md5
@@ -0,0 +1 @@
+86073be500b815e2c51e92bce14d8c73
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.svg b/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.svg
new file mode 100644
index 000000000..651302580
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ad573c8ae66ab66156d03e5e81bbba214_cgraph.svg
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+games::memory_game::init
+
+
+Node1
+
+
+games::memory_game
+::init
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+std::vector::begin
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::vector::end
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+std::vector::push_back
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+std::shuffle
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+std::vector::size
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.map b/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.map
new file mode 100644
index 000000000..77a2a17c3
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.map
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.md5 b/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.md5
new file mode 100644
index 000000000..55f9bdea1
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.md5
@@ -0,0 +1 @@
+f46379d95a9b6e538a335e1d3d3d2718
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.svg b/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.svg
new file mode 100644
index 000000000..5e4861f77
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_adc62ebb75853446656e24932bdc6dd6b_cgraph.svg
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+games::memory_game::reset_data
+
+
+Node1
+
+
+games::memory_game
+::reset_data
+
+
+
+
+
+Node1->Node1
+
+
+
+
+
+Node2
+
+
+games::memory_game
+::ask_data
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node2->Node1
+
+
+
+
+
+Node2->Node2
+
+
+
+
+
+Node3
+
+
+games::memory_game
+::is_number
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+Node4
+
+
+games::memory_game
+::print_table
+
+
+
+
+
+Node2->Node4
+
+
+
+
+
+Node3->Node3
+
+
+
+
+
+Node4->Node4
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
new file mode 100644
index 000000000..ff99aac29
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
new file mode 100644
index 000000000..52f5ab66b
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -0,0 +1 @@
+567219e7a892d31c6417521604de40a4
\ No newline at end of file
diff --git a/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
new file mode 100644
index 000000000..b53cf138a
--- /dev/null
+++ b/dd/d92/memory__game_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+main
+
+
+Node1
+
+
+main
+
+
+
+
+
+Node2
+
+
+std::boolalpha
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+std::srand
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+std::time
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
diff --git a/df/d66/vector__cross__product_8cpp.html b/df/d66/vector__cross__product_8cpp.html
index 02f5e680a..36f08e28a 100644
--- a/df/d66/vector__cross__product_8cpp.html
+++ b/df/d66/vector__cross__product_8cpp.html
@@ -151,7 +151,7 @@ Functions
The direction ratios (DR) are calculated as follows: 1st DR, J: (b * z) - (c * y) 2nd DR, A: -((a * z) - (c * x)) 3rd DR, N: (a * y) - (b * x)
Therefore, the direction ratios of the cross product are: J, A, N The following C++ Program calculates the direction ratios of the cross products of two vector. The program uses a function, cross() for doing so. The direction ratios for the first and the second vector has to be passed one by one seperated by a space character.
Magnitude of a vector is the square root of the sum of the squares of the direction ratios.
diff --git a/dir_000002_000015.html b/dir_000002_000016.html
similarity index 100%
rename from dir_000002_000015.html
rename to dir_000002_000016.html
diff --git a/dir_4b6f782e158b0b98da980a0e11a23a15.html b/dir_4b6f782e158b0b98da980a0e11a23a15.html
new file mode 100644
index 000000000..961197a90
--- /dev/null
+++ b/dir_4b6f782e158b0b98da980a0e11a23a15.html
@@ -0,0 +1,120 @@
+
+
+
+
+
+
diff --git a/dir_4b6f782e158b0b98da980a0e11a23a15.js b/dir_4b6f782e158b0b98da980a0e11a23a15.js
new file mode 100644
index 000000000..55e3dbc3b
--- /dev/null
+++ b/dir_4b6f782e158b0b98da980a0e11a23a15.js
@@ -0,0 +1,4 @@
+var dir_4b6f782e158b0b98da980a0e11a23a15 =
+[
+ [ "memory_game.cpp", "dd/d92/memory__game_8cpp.html", "dd/d92/memory__game_8cpp" ]
+];
\ No newline at end of file
diff --git a/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.map b/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.map
index 47bd40197..3e6d2399e 100644
--- a/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.map
+++ b/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.map
@@ -1,5 +1,5 @@
diff --git a/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.md5 b/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.md5
index a8558b7a0..09f355569 100644
--- a/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.md5
+++ b/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.md5
@@ -1 +1 @@
-951ca40643d78dab7d47c7a21af8899f
\ No newline at end of file
+ae1192e77f9b7318f81d8fb698861684
\ No newline at end of file
diff --git a/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.svg b/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.svg
index cbbcf71b1..0423f6c42 100644
--- a/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.svg
+++ b/dir_4d6e05837bf820fb089a8a8cdf2f42b7_dep.svg
@@ -31,7 +31,7 @@
+
1
diff --git a/files.html b/files.html
index 2fa0db8b8..64b8f3936 100644
--- a/files.html
+++ b/files.html
@@ -182,226 +182,228 @@ solve-a-rat-in-a-maze-c-java-pytho/" target="_blank">Rat in a Maze algorithm
shortest_common_supersequence.cpp SCS is a string Z which is the shortest supersequence of strings X and Y (may not be continuous in Z, but order is maintained)
subset_sum.cpp Implements [Sub-set sum problem] (https://en.wikipedia.org/wiki/Subset_sum_problem ) algorithm, which tells whether a subset with target sum exists or not
word_break.cpp Word Break Problem
- ► geometry
- graham_scan_functions.hpp
- jarvis_algorithm.cpp Implementation of Jarvis’s algorithm
- line_segment_intersection.cpp Check whether two line segments intersect each other or not
- ► graph
- bidirectional_dijkstra.cpp [Bidirectional Dijkstra Shortest Path Algorithm] (https://www.coursera.org/learn/algorithms-on-graphs/lecture/7ml18/bidirectional-dijkstra )
- breadth_first_search.cpp Breadth First Search Algorithm (Breadth First Search)
- connected_components.cpp [Graph Connected Components (Connected Components)] (https://en.wikipedia.org/wiki/Component_(graph_theory) )
- connected_components_with_dsu.cpp Disjoint union
- depth_first_search.cpp Depth First Search Algorithm (Depth First Search)
- depth_first_search_with_stack.cpp Depth First Search Algorithm using Stack (Depth First Search Algorithm)
- dijkstra.cpp [Graph Dijkstras Shortest Path Algorithm (Dijkstra's Shortest Path)] (https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm )
- hamiltons_cycle.cpp The implementation of Hamilton's cycle dynamic solution for vertices number less than 20
- hopcroft_karp.cpp Implementation of Hopcroft–Karp algorithm
- is_graph_bipartite.cpp Algorithm to check whether a graph is bipartite
- lowest_common_ancestor.cpp Data structure for finding the lowest common ancestor of two vertices in a rooted tree using binary lifting
- travelling_salesman_problem.cpp [Travelling Salesman Problem] (https://en.wikipedia.org/wiki/Travelling_salesman_problem ) implementation
- ► graphics
- spirograph.cpp Implementation of Spirograph
- ► greedy_algorithms
- boruvkas_minimum_spanning_tree.cpp [Borůvkas Algorithm](https://en.wikipedia.org/wiki/Borůvka's_algorithm ) to find the Minimum Spanning Tree
- jumpgame.cpp Implementation of an algorithm to solve the jumping game problem
- ► hashing
- chaining.cpp Implementation of hash chains
- double_hash_hash_table.cpp Storage mechanism using double-hashed keys
- linear_probing_hash_table.cpp Storage mechanism using linear probing hash keys
- md5.cpp Simple C++ implementation of the MD5 Hashing Algorithm
- quadratic_probing_hash_table.cpp Storage mechanism using quadratic probing hash keys
- sha1.cpp Simple C++ implementation of the SHA-1 Hashing Algorithm
- ► machine_learning
- adaline_learning.cpp Adaptive Linear Neuron (ADALINE) implementation
- k_nearest_neighbors.cpp Implementation of [K-Nearest Neighbors algorithm] (https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm )
- kohonen_som_topology.cpp Kohonen self organizing map (topological map)
- kohonen_som_trace.cpp Kohonen self organizing map (data tracing)
- neural_network.cpp Implementation of [Multilayer Perceptron] (https://en.wikipedia.org/wiki/Multilayer_perceptron )
- ordinary_least_squares_regressor.cpp Linear regression example using Ordinary least squares
- vector_ops.hpp Various functions for vectors associated with [NeuralNetwork (aka Multilayer Perceptron)] (https://en.wikipedia.org/wiki/Multilayer_perceptron )
- ► math
- aliquot_sum.cpp Program to return the Aliquot Sum of a number
- approximate_pi.cpp Implementation to calculate an estimate of the number π (Pi)
- area.cpp Implementations for the area of various shapes
- armstrong_number.cpp Program to check if a number is an Armstrong/Narcissistic number in decimal system
- binary_exponent.cpp C++ Program to find Binary Exponent Iteratively and Recursively
- binomial_calculate.cpp Program to calculate Binomial coefficients
- check_amicable_pair.cpp A C++ Program to check whether a pair of number is amicable pair or not
- check_factorial.cpp A simple program to check if the given number is a factorial of some number or not
- check_prime.cpp Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+6 jumping and check for i or i+2 to be a factor of the number; if it's a factor then we will return false otherwise true after the loop terminates at the terminating condition which is (i*i<=num)
- complex_numbers.cpp An implementation of Complex Number as Objects
- double_factorial.cpp Compute double factorial : \(n!!\)
- eratosthenes.cpp The Sieve of Eratosthenes
- eulers_totient_function.cpp Implementation of Euler's Totient @description Euler Totient Function is also known as phi function
- extended_euclid_algorithm.cpp GCD using [extended Euclid's algorithm] (https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm )
- factorial.cpp C++ program to find factorial of given number
- fast_power.cpp Faster computation for \(a^b\)
- fibonacci.cpp Generate fibonacci sequence
- fibonacci_fast.cpp Faster computation of Fibonacci series
- fibonacci_large.cpp Computes N^th Fibonacci number given as input argument. Uses custom build arbitrary integers library to perform additions and other operations
- fibonacci_matrix_exponentiation.cpp This program computes the N^th Fibonacci number in modulo mod input argument
- fibonacci_sum.cpp An algorithm to calculate the sum of Fibonacci Sequence : \(\mathrm{F}(n) +
+ ► games
+ memory_game.cpp A simple Memory Game with 3 different sizes and multiple letters
+ ► geometry
+ graham_scan_functions.hpp
+ jarvis_algorithm.cpp Implementation of Jarvis’s algorithm
+ line_segment_intersection.cpp Check whether two line segments intersect each other or not
+ ► graph
+ bidirectional_dijkstra.cpp [Bidirectional Dijkstra Shortest Path Algorithm] (https://www.coursera.org/learn/algorithms-on-graphs/lecture/7ml18/bidirectional-dijkstra )
+ breadth_first_search.cpp Breadth First Search Algorithm (Breadth First Search)
+ connected_components.cpp [Graph Connected Components (Connected Components)] (https://en.wikipedia.org/wiki/Component_(graph_theory) )
+ connected_components_with_dsu.cpp Disjoint union
+ depth_first_search.cpp Depth First Search Algorithm (Depth First Search)
+ depth_first_search_with_stack.cpp Depth First Search Algorithm using Stack (Depth First Search Algorithm)
+ dijkstra.cpp [Graph Dijkstras Shortest Path Algorithm (Dijkstra's Shortest Path)] (https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm )
+ hamiltons_cycle.cpp The implementation of Hamilton's cycle dynamic solution for vertices number less than 20
+ hopcroft_karp.cpp Implementation of Hopcroft–Karp algorithm
+ is_graph_bipartite.cpp Algorithm to check whether a graph is bipartite
+ lowest_common_ancestor.cpp Data structure for finding the lowest common ancestor of two vertices in a rooted tree using binary lifting
+ travelling_salesman_problem.cpp [Travelling Salesman Problem] (https://en.wikipedia.org/wiki/Travelling_salesman_problem ) implementation
+ ► graphics
+ spirograph.cpp Implementation of Spirograph
+ ► greedy_algorithms
+ boruvkas_minimum_spanning_tree.cpp [Borůvkas Algorithm](https://en.wikipedia.org/wiki/Borůvka's_algorithm ) to find the Minimum Spanning Tree
+ jumpgame.cpp Implementation of an algorithm to solve the jumping game problem
+ ► hashing
+ chaining.cpp Implementation of hash chains
+ double_hash_hash_table.cpp Storage mechanism using double-hashed keys
+ linear_probing_hash_table.cpp Storage mechanism using linear probing hash keys
+ md5.cpp Simple C++ implementation of the MD5 Hashing Algorithm
+ quadratic_probing_hash_table.cpp Storage mechanism using quadratic probing hash keys
+ sha1.cpp Simple C++ implementation of the SHA-1 Hashing Algorithm
+ ► machine_learning
+ adaline_learning.cpp Adaptive Linear Neuron (ADALINE) implementation
+ k_nearest_neighbors.cpp Implementation of [K-Nearest Neighbors algorithm] (https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm )
+ kohonen_som_topology.cpp Kohonen self organizing map (topological map)
+ kohonen_som_trace.cpp Kohonen self organizing map (data tracing)
+ neural_network.cpp Implementation of [Multilayer Perceptron] (https://en.wikipedia.org/wiki/Multilayer_perceptron )
+ ordinary_least_squares_regressor.cpp Linear regression example using Ordinary least squares
+ vector_ops.hpp Various functions for vectors associated with [NeuralNetwork (aka Multilayer Perceptron)] (https://en.wikipedia.org/wiki/Multilayer_perceptron )
+ ► math
+ aliquot_sum.cpp Program to return the Aliquot Sum of a number
+ approximate_pi.cpp Implementation to calculate an estimate of the number π (Pi)
+ area.cpp Implementations for the area of various shapes
+ armstrong_number.cpp Program to check if a number is an Armstrong/Narcissistic number in decimal system
+ binary_exponent.cpp C++ Program to find Binary Exponent Iteratively and Recursively
+ binomial_calculate.cpp Program to calculate Binomial coefficients
+ check_amicable_pair.cpp A C++ Program to check whether a pair of number is amicable pair or not
+ check_factorial.cpp A simple program to check if the given number is a factorial of some number or not
+ check_prime.cpp Reduced all possibilities of a number which cannot be prime. Eg: No even number, except 2 can be a prime number, hence we will increment our loop with i+6 jumping and check for i or i+2 to be a factor of the number; if it's a factor then we will return false otherwise true after the loop terminates at the terminating condition which is (i*i<=num)
+ complex_numbers.cpp An implementation of Complex Number as Objects
+ double_factorial.cpp Compute double factorial : \(n!!\)
+ eratosthenes.cpp The Sieve of Eratosthenes
+ eulers_totient_function.cpp Implementation of Euler's Totient @description Euler Totient Function is also known as phi function
+ extended_euclid_algorithm.cpp GCD using [extended Euclid's algorithm] (https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm )
+ factorial.cpp C++ program to find factorial of given number
+ fast_power.cpp Faster computation for \(a^b\)
+ fibonacci.cpp Generate fibonacci sequence
+ fibonacci_fast.cpp Faster computation of Fibonacci series
+ fibonacci_large.cpp Computes N^th Fibonacci number given as input argument. Uses custom build arbitrary integers library to perform additions and other operations
+ fibonacci_matrix_exponentiation.cpp This program computes the N^th Fibonacci number in modulo mod input argument
+ fibonacci_sum.cpp An algorithm to calculate the sum of Fibonacci Sequence : \(\mathrm{F}(n) +
\mathrm{F}(n+1) + .. + \mathrm{F}(m)\)
- finding_number_of_digits_in_a_number.cpp [Program to count digits in an integer](https://www.geeksforgeeks.org/program-count-digits-integer-3-different-methods )
- gcd_iterative_euclidean.cpp Compute the greatest common denominator of two integers using iterative form of Euclidean algorithm
- gcd_of_n_numbers.cpp This program aims at calculating the GCD of n numbers by division method
- gcd_recursive_euclidean.cpp Compute the greatest common denominator of two integers using recursive form of Euclidean algorithm
- integral_approximation.cpp Compute integral approximation of the function using Riemann sum
- integral_approximation2.cpp Monte Carlo Integration
- inv_sqrt.cpp Implementation of the inverse square root Root
- large_factorial.cpp Compute factorial of any arbitratily large number/
- large_number.h Library to perform arithmatic operations on arbitrarily large numbers
- largest_power.cpp Algorithm to find largest x such that p^x divides n! (factorial) using Legendre's Formula
- lcm_sum.cpp An algorithm to calculate the sum of LCM: \(\mathrm{LCM}(1,n) +
+ finding_number_of_digits_in_a_number.cpp [Program to count digits in an integer](https://www.geeksforgeeks.org/program-count-digits-integer-3-different-methods )
+ gcd_iterative_euclidean.cpp Compute the greatest common denominator of two integers using iterative form of Euclidean algorithm
+ gcd_of_n_numbers.cpp This program aims at calculating the GCD of n numbers by division method
+ gcd_recursive_euclidean.cpp Compute the greatest common denominator of two integers using recursive form of Euclidean algorithm
+ integral_approximation.cpp Compute integral approximation of the function using Riemann sum
+ integral_approximation2.cpp Monte Carlo Integration
+ inv_sqrt.cpp Implementation of the inverse square root Root
+ large_factorial.cpp Compute factorial of any arbitratily large number/
+ large_number.h Library to perform arithmatic operations on arbitrarily large numbers
+ largest_power.cpp Algorithm to find largest x such that p^x divides n! (factorial) using Legendre's Formula
+ lcm_sum.cpp An algorithm to calculate the sum of LCM: \(\mathrm{LCM}(1,n) +
\mathrm{LCM}(2,n) + \ldots + \mathrm{LCM}(n,n)\)
- least_common_multiple.cpp
- magic_number.cpp A simple program to check if the given number is a magic number or not. A number is said to be a magic number, if the sum of its digits are calculated till a single digit recursively by adding the sum of the digits after every addition. If the single digit comes out to be 1,then the number is a magic number
- miller_rabin.cpp
- modular_division.cpp An algorithm to divide two numbers under modulo p Modular Division
- modular_exponentiation.cpp C++ Program for Modular Exponentiation Iteratively
- modular_inverse_fermat_little_theorem.cpp C++ Program to find the modular inverse using Fermat's Little Theorem
- modular_inverse_simple.cpp Simple implementation of modular multiplicative inverse
- n_bonacci.cpp Implementation of the N-bonacci series
- n_choose_r.cpp Combinations n choose r function implementation
- ncr_modulo_p.cpp This program aims at calculating nCr modulo p
- number_of_positive_divisors.cpp C++ Program to calculate the number of positive divisors
- perimeter.cpp Implementations for the perimeter of various shapes
- power_for_huge_numbers.cpp Compute powers of large numbers
- power_of_two.cpp Implementation to check whether a number is a power of 2 or not
- prime_factorization.cpp Prime factorization of positive integers
- prime_numbers.cpp Get list of prime numbers
- primes_up_to_billion.cpp Compute prime numbers upto 1 billion
- quadratic_equations_complex_numbers.cpp Calculate quadratic equation with complex roots, i.e. b^2 - 4ac < 0
- realtime_stats.cpp Compute statistics for data entered in rreal-time
- sieve_of_eratosthenes.cpp Get list of prime numbers using Sieve of Eratosthenes
- sqrt_double.cpp Calculate the square root of any positive real number in \(O(\log
+ least_common_multiple.cpp
+ magic_number.cpp A simple program to check if the given number is a magic number or not. A number is said to be a magic number, if the sum of its digits are calculated till a single digit recursively by adding the sum of the digits after every addition. If the single digit comes out to be 1,then the number is a magic number
+ miller_rabin.cpp
+ modular_division.cpp An algorithm to divide two numbers under modulo p Modular Division
+ modular_exponentiation.cpp C++ Program for Modular Exponentiation Iteratively
+ modular_inverse_fermat_little_theorem.cpp C++ Program to find the modular inverse using Fermat's Little Theorem
+ modular_inverse_simple.cpp Simple implementation of modular multiplicative inverse
+ n_bonacci.cpp Implementation of the N-bonacci series
+ n_choose_r.cpp Combinations n choose r function implementation
+ ncr_modulo_p.cpp This program aims at calculating nCr modulo p
+ number_of_positive_divisors.cpp C++ Program to calculate the number of positive divisors
+ perimeter.cpp Implementations for the perimeter of various shapes
+ power_for_huge_numbers.cpp Compute powers of large numbers
+ power_of_two.cpp Implementation to check whether a number is a power of 2 or not
+ prime_factorization.cpp Prime factorization of positive integers
+ prime_numbers.cpp Get list of prime numbers
+ primes_up_to_billion.cpp Compute prime numbers upto 1 billion
+ quadratic_equations_complex_numbers.cpp Calculate quadratic equation with complex roots, i.e. b^2 - 4ac < 0
+ realtime_stats.cpp Compute statistics for data entered in rreal-time
+ sieve_of_eratosthenes.cpp Get list of prime numbers using Sieve of Eratosthenes
+ sqrt_double.cpp Calculate the square root of any positive real number in \(O(\log
N)\) time, with precision fixed using bisection method of root-finding
- string_fibonacci.cpp This Programme returns the Nth fibonacci as a string
- sum_of_binomial_coefficient.cpp Algorithm to find sum of binomial coefficients of a given positive integer
- sum_of_digits.cpp A C++ Program to find the Sum of Digits of input integer
- vector_cross_product.cpp Calculates the Cross Product and the magnitude of two mathematical 3D vectors
- volume.cpp Implmentations for the volume of various 3D shapes
- ► numerical_methods
- babylonian_method.cpp A babylonian method (BM) is an algorithm that computes the square root
- bisection_method.cpp Solve the equation \(f(x)=0\) using bisection method
- brent_method_extrema.cpp Find real extrema of a univariate real function in a given interval using Brent's method
- composite_simpson_rule.cpp Implementation of the Composite Simpson Rule for the approximation
- durand_kerner_roots.cpp Compute all possible approximate roots of any given polynomial using Durand Kerner algorithm
- false_position.cpp Solve the equation \(f(x)=0\) using false position method , also known as the Secant method
- fast_fourier_transform.cpp A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT)
- gaussian_elimination.cpp Gaussian elimination method
- golden_search_extrema.cpp Find extrema of a univariate real function in a given interval using golden section search algorithm
- gram_schmidt.cpp Gram Schmidt Orthogonalisation Process
- inverse_fast_fourier_transform.cpp An inverse fast Fourier transform (IFFT) is an algorithm that computes the inverse fourier transform
- lu_decompose.cpp LU decomposition of a square matrix
- lu_decomposition.h Functions associated with LU Decomposition of a square matrix
- midpoint_integral_method.cpp A numerical method for easy approximation of integrals
- newton_raphson_method.cpp Solve the equation \(f(x)=0\) using Newton-Raphson method for both real and complex solutions
- ode_forward_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using forward Euler method
- ode_midpoint_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using midpoint Euler method
- ode_semi_implicit_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using semi implicit Euler method
- qr_decompose.h Library functions to compute QR decomposition of a given matrix
- qr_decomposition.cpp Program to compute the QR decomposition of a given matrix
- qr_eigen_values.cpp Compute real eigen values and eigen vectors of a symmetric matrix using QR decomposition method
- rungekutta.cpp Runge Kutta fourth order method implementation
- successive_approximation.cpp Method of successive approximations using fixed-point iteration method
- ► operations_on_datastructures
- array_left_rotation.cpp Implementation for the Array Left Rotation algorithm
- array_right_rotation.cpp Implementation for the Array right Rotation algorithm
- circular_linked_list.cpp Implementation for a Circular Linked List
- inorder_successor_of_bst.cpp An implementation for finding the Inorder successor of a binary search tree Inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in Inorder traversal
- intersection_of_two_arrays.cpp Implementation for the Intersection of two sorted Arrays algorithm
- reverse_binary_tree.cpp Implementation for the Reversing a Binary Tree recursively algorithm
- trie_multiple_search.cpp Trie datastructure with search variants
- union_of_two_arrays.cpp Implementation for the Union of two sorted Arrays algorithm
- ► others
- buzz_number.cpp A buzz number is a number that is either divisible by 7 or has last digit as 7
- decimal_to_binary.cpp Function to convert decimal number to binary representation
- decimal_to_hexadecimal.cpp Convert decimal number to hexadecimal representation
- decimal_to_roman_numeral.cpp This Programme Converts a given decimal number in the range [0,4000) to both Lower case and Upper case Roman Numeral
- fast_integer_input.cpp Read integers from stdin continuously as they are entered without waiting for the \n character
- happy_number.cpp A happy number is a number whose sum of digits is calculated until the sum is a single digit, and this sum turns out to be 1
- iterative_tree_traversals.cpp Iterative version of Preorder, Postorder, and preorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
- kadanes3.cpp Efficient implementation for maximum contiguous subarray sum by Kadane's algorithm
- kelvin_to_celsius.cpp Conversion from Kelvin to Celsius degrees
- lru_cache.cpp An implementation of LRU Cache . Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies)
- matrix_exponentiation.cpp Matrix Exponentiation
- palindrome_of_number.cpp Check if a number is palindrome or not
- paranthesis_matching.cpp Perform paranthesis matching
- pascal_triangle.cpp Pascal's triangle implementation
- postfix_evaluation.cpp Evaluation of Postfix Expression
- primality_test.cpp Primality test implementation
- recursive_tree_traversal.cpp Recursive version of Inorder, Preorder, and Postorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
- smallest_circle.cpp Get centre and radius of the smallest circle that circumscribes given set of points
- sparse_matrix.cpp
- spiral_print.cpp Print the elements of a matrix traversing it spirally
- stairs_pattern.cpp This program is use to print the following pattern
- tower_of_hanoi.cpp Solve the Tower of Hanoi problem
- vector_important_functions.cpp A C++ program to demonstrate working of std::sort() , std::reverse()
- ► physics
- ground_to_ground_projectile_motion.cpp Ground to ground projectile motion equation implementations
- ► probability
- addition_rule.cpp Addition rule of probabilities
- bayes_theorem.cpp Bayes' theorem
- binomial_dist.cpp Binomial distribution example
- geometric_dist.cpp Geometric Distribution
- poisson_dist.cpp Poisson statistics
- windowed_median.cpp An implementation of a median calculation of a sliding window along a data stream
- ► range_queries
- fenwick_tree.cpp Fenwick tree
- heavy_light_decomposition.cpp Heavy Light Decomposition implementation
- persistent_seg_tree_lazy_prop.cpp Persistent segment tree with range updates (lazy propagation)
- prefix_sum_array.cpp Prefix Sum Array data structure implementation
- segtree.cpp Implementation of [Segment Tree] (https://en.wikipedia.org/wiki/Segment_tree ) data structure
- sparse_table.cpp Implementation of Sparse Table data structure
- ► search
- exponential_search.cpp Exponential search algorithm
- fibonacci_search.cpp Fibonacci search algorithm
- floyd_cycle_detection_algo.cpp Implementation of Floyd's Cycle Detection algorithm
- hash_search.cpp Hash Search Algorithm - Best Time Complexity Ω(1)
- interpolation_search2.cpp Interpolation search algorithm
- jump_search.cpp C++ program to implement Jump Search
- linear_search.cpp Linear search algorithm
- median_search.cpp Implementation of Median search algorithm. @cases from here
- median_search2.cpp Given a linked list L[0,....,n] of n numbers, find the middle node
- saddleback_search.cpp Implementation of Saddleback Algorithm for 2D arrays
- sublist_search.cpp Implementation of the Sublist Search Algorithm
- ternary_search.cpp Ternary search algorithm
- text_search.cpp Search for words in a long textual paragraph
- ► sorting
- binary_insertion_sort.cpp Binary Insertion Sort Algorithm (Insertion Sort)
- bogo_sort.cpp Implementation of Bogosort algorithm
- bubble_sort.cpp Bubble sort algorithm
- comb_sort.cpp Comb Sort Algorithm (Comb Sort)
- count_inversions.cpp Counting Inversions using Merge Sort
- cycle_sort.cpp Implementation of Cycle sort algorithm
- dnf_sort.cpp Implementation of the DNF sort implementation
- gnome_sort.cpp Implementation of gnome sort algorithm
- heap_sort.cpp Heap Sort Algorithm (heap sort) implementation
- insertion_sort.cpp Insertion Sort Algorithm (Insertion Sort)
- merge_insertion_sort.cpp Algorithm that combines insertion sort and merge sort. Wiki link
- merge_sort.cpp Merege Sort Algorithm (MEREGE SORT) implementation
- non_recursive_merge_sort.cpp
- pancake_sort.cpp Pancake sort sorts a disordered stack of pancakes by flipping any number of pancakes using a spatula using minimum number of flips
- pigeonhole_sort.cpp Implementation of [Pigeonhole Sort algorithm] (https://en.wikipedia.org/wiki/Pigeonhole_sort )
- quick_sort.cpp Quick sort implementation in C++
- quick_sort_3.cpp Implementation Details
- radix_sort2.cpp Algorithm of Radix sort
- random_pivot_quick_sort.cpp Implementation of the Random Pivot Quick Sort algorithm
- recursive_bubble_sort.cpp This is an implementation of a recursive version of the Bubble sort algorithm
- selection_sort_recursive.cpp Implementation of the Selection sort implementation using recursion
- shell_sort2.cpp Shell sort algorithm
- stooge_sort.cpp Stooge sort implementation in C++
- strand_sort.cpp Implementation of Strand Sort algorithm
- wave_sort.cpp Implementation of the Wave sort algorithm
- wiggle_sort.cpp [Wiggle Sort Algorithm] (https://leetcode.com/problems/wiggle-sort-ii/ ) Implementation
- ► strings
- brute_force_string_searching.cpp String pattern search - brute force
- horspool.cpp Horspool's algorithm that finds if a string contains a substring (https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm )
- knuth_morris_pratt.cpp The Knuth-Morris-Pratt Algorithm for finding a pattern within a piece of text with complexity O(n + m)
- manacher_algorithm.cpp Implementation of Manacher's Algorithm
- rabin_karp.cpp The Rabin-Karp Algorithm for finding a pattern within a piece of text with complexity O(n + m)
- z_function.cpp The Z function for finding occurences of a pattern within a piece of text with time and space complexity O(n + m)
+ string_fibonacci.cpp This Programme returns the Nth fibonacci as a string
+ sum_of_binomial_coefficient.cpp Algorithm to find sum of binomial coefficients of a given positive integer
+ sum_of_digits.cpp A C++ Program to find the Sum of Digits of input integer
+ vector_cross_product.cpp Calculates the Cross Product and the magnitude of two mathematical 3D vectors
+ volume.cpp Implmentations for the volume of various 3D shapes
+ ► numerical_methods
+ babylonian_method.cpp A babylonian method (BM) is an algorithm that computes the square root
+ bisection_method.cpp Solve the equation \(f(x)=0\) using bisection method
+ brent_method_extrema.cpp Find real extrema of a univariate real function in a given interval using Brent's method
+ composite_simpson_rule.cpp Implementation of the Composite Simpson Rule for the approximation
+ durand_kerner_roots.cpp Compute all possible approximate roots of any given polynomial using Durand Kerner algorithm
+ false_position.cpp Solve the equation \(f(x)=0\) using false position method , also known as the Secant method
+ fast_fourier_transform.cpp A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT)
+ gaussian_elimination.cpp Gaussian elimination method
+ golden_search_extrema.cpp Find extrema of a univariate real function in a given interval using golden section search algorithm
+ gram_schmidt.cpp Gram Schmidt Orthogonalisation Process
+ inverse_fast_fourier_transform.cpp An inverse fast Fourier transform (IFFT) is an algorithm that computes the inverse fourier transform
+ lu_decompose.cpp LU decomposition of a square matrix
+ lu_decomposition.h Functions associated with LU Decomposition of a square matrix
+ midpoint_integral_method.cpp A numerical method for easy approximation of integrals
+ newton_raphson_method.cpp Solve the equation \(f(x)=0\) using Newton-Raphson method for both real and complex solutions
+ ode_forward_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using forward Euler method
+ ode_midpoint_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using midpoint Euler method
+ ode_semi_implicit_euler.cpp Solve a multivariable first order ordinary differential equation (ODEs) using semi implicit Euler method
+ qr_decompose.h Library functions to compute QR decomposition of a given matrix
+ qr_decomposition.cpp Program to compute the QR decomposition of a given matrix
+ qr_eigen_values.cpp Compute real eigen values and eigen vectors of a symmetric matrix using QR decomposition method
+ rungekutta.cpp Runge Kutta fourth order method implementation
+ successive_approximation.cpp Method of successive approximations using fixed-point iteration method
+ ► operations_on_datastructures
+ array_left_rotation.cpp Implementation for the Array Left Rotation algorithm
+ array_right_rotation.cpp Implementation for the Array right Rotation algorithm
+ circular_linked_list.cpp Implementation for a Circular Linked List
+ inorder_successor_of_bst.cpp An implementation for finding the Inorder successor of a binary search tree Inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in Inorder traversal
+ intersection_of_two_arrays.cpp Implementation for the Intersection of two sorted Arrays algorithm
+ reverse_binary_tree.cpp Implementation for the Reversing a Binary Tree recursively algorithm
+ trie_multiple_search.cpp Trie datastructure with search variants
+ union_of_two_arrays.cpp Implementation for the Union of two sorted Arrays algorithm
+ ► others
+ buzz_number.cpp A buzz number is a number that is either divisible by 7 or has last digit as 7
+ decimal_to_binary.cpp Function to convert decimal number to binary representation
+ decimal_to_hexadecimal.cpp Convert decimal number to hexadecimal representation
+ decimal_to_roman_numeral.cpp This Programme Converts a given decimal number in the range [0,4000) to both Lower case and Upper case Roman Numeral
+ fast_integer_input.cpp Read integers from stdin continuously as they are entered without waiting for the \n character
+ happy_number.cpp A happy number is a number whose sum of digits is calculated until the sum is a single digit, and this sum turns out to be 1
+ iterative_tree_traversals.cpp Iterative version of Preorder, Postorder, and preorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
+ kadanes3.cpp Efficient implementation for maximum contiguous subarray sum by Kadane's algorithm
+ kelvin_to_celsius.cpp Conversion from Kelvin to Celsius degrees
+ lru_cache.cpp An implementation of LRU Cache . Lru is a part of cache algorithms (also frequently called cache replacement algorithms or cache replacement policies)
+ matrix_exponentiation.cpp Matrix Exponentiation
+ palindrome_of_number.cpp Check if a number is palindrome or not
+ paranthesis_matching.cpp Perform paranthesis matching
+ pascal_triangle.cpp Pascal's triangle implementation
+ postfix_evaluation.cpp Evaluation of Postfix Expression
+ primality_test.cpp Primality test implementation
+ recursive_tree_traversal.cpp Recursive version of Inorder, Preorder, and Postorder [Traversal of the Tree] (https://en.wikipedia.org/wiki/Tree_traversal )
+ smallest_circle.cpp Get centre and radius of the smallest circle that circumscribes given set of points
+ sparse_matrix.cpp
+ spiral_print.cpp Print the elements of a matrix traversing it spirally
+ stairs_pattern.cpp This program is use to print the following pattern
+ tower_of_hanoi.cpp Solve the Tower of Hanoi problem
+ vector_important_functions.cpp A C++ program to demonstrate working of std::sort() , std::reverse()
+ ► physics
+ ground_to_ground_projectile_motion.cpp Ground to ground projectile motion equation implementations
+ ► probability
+ addition_rule.cpp Addition rule of probabilities
+ bayes_theorem.cpp Bayes' theorem
+ binomial_dist.cpp Binomial distribution example
+ geometric_dist.cpp Geometric Distribution
+ poisson_dist.cpp Poisson statistics
+ windowed_median.cpp An implementation of a median calculation of a sliding window along a data stream
+ ► range_queries
+ fenwick_tree.cpp Fenwick tree
+ heavy_light_decomposition.cpp Heavy Light Decomposition implementation
+ persistent_seg_tree_lazy_prop.cpp Persistent segment tree with range updates (lazy propagation)
+ prefix_sum_array.cpp Prefix Sum Array data structure implementation
+ segtree.cpp Implementation of [Segment Tree] (https://en.wikipedia.org/wiki/Segment_tree ) data structure
+ sparse_table.cpp Implementation of Sparse Table data structure
+ ► search
+ exponential_search.cpp Exponential search algorithm
+ fibonacci_search.cpp Fibonacci search algorithm
+ floyd_cycle_detection_algo.cpp Implementation of Floyd's Cycle Detection algorithm
+ hash_search.cpp Hash Search Algorithm - Best Time Complexity Ω(1)
+ interpolation_search2.cpp Interpolation search algorithm
+ jump_search.cpp C++ program to implement Jump Search
+ linear_search.cpp Linear search algorithm
+ median_search.cpp Implementation of Median search algorithm. @cases from here
+ median_search2.cpp Given a linked list L[0,....,n] of n numbers, find the middle node
+ saddleback_search.cpp Implementation of Saddleback Algorithm for 2D arrays
+ sublist_search.cpp Implementation of the Sublist Search Algorithm
+ ternary_search.cpp Ternary search algorithm
+ text_search.cpp Search for words in a long textual paragraph
+ ► sorting
+ binary_insertion_sort.cpp Binary Insertion Sort Algorithm (Insertion Sort)
+ bogo_sort.cpp Implementation of Bogosort algorithm
+ bubble_sort.cpp Bubble sort algorithm
+ comb_sort.cpp Comb Sort Algorithm (Comb Sort)
+ count_inversions.cpp Counting Inversions using Merge Sort
+ cycle_sort.cpp Implementation of Cycle sort algorithm
+ dnf_sort.cpp Implementation of the DNF sort implementation
+ gnome_sort.cpp Implementation of gnome sort algorithm
+ heap_sort.cpp Heap Sort Algorithm (heap sort) implementation
+ insertion_sort.cpp Insertion Sort Algorithm (Insertion Sort)
+ merge_insertion_sort.cpp Algorithm that combines insertion sort and merge sort. Wiki link
+ merge_sort.cpp Merege Sort Algorithm (MEREGE SORT) implementation
+ non_recursive_merge_sort.cpp
+ pancake_sort.cpp Pancake sort sorts a disordered stack of pancakes by flipping any number of pancakes using a spatula using minimum number of flips
+ pigeonhole_sort.cpp Implementation of [Pigeonhole Sort algorithm] (https://en.wikipedia.org/wiki/Pigeonhole_sort )
+ quick_sort.cpp Quick sort implementation in C++
+ quick_sort_3.cpp Implementation Details
+ radix_sort2.cpp Algorithm of Radix sort
+ random_pivot_quick_sort.cpp Implementation of the Random Pivot Quick Sort algorithm
+ recursive_bubble_sort.cpp This is an implementation of a recursive version of the Bubble sort algorithm
+ selection_sort_recursive.cpp Implementation of the Selection sort implementation using recursion
+ shell_sort2.cpp Shell sort algorithm
+ stooge_sort.cpp Stooge sort implementation in C++
+ strand_sort.cpp Implementation of Strand Sort algorithm
+ wave_sort.cpp Implementation of the Wave sort algorithm
+ wiggle_sort.cpp [Wiggle Sort Algorithm] (https://leetcode.com/problems/wiggle-sort-ii/ ) Implementation
+ ► strings
+ brute_force_string_searching.cpp String pattern search - brute force
+ horspool.cpp Horspool's algorithm that finds if a string contains a substring (https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore%E2%80%93Horspool_algorithm )
+ knuth_morris_pratt.cpp The Knuth-Morris-Pratt Algorithm for finding a pattern within a piece of text with complexity O(n + m)
+ manacher_algorithm.cpp Implementation of Manacher's Algorithm
+ rabin_karp.cpp The Rabin-Karp Algorithm for finding a pattern within a piece of text with complexity O(n + m)
+ z_function.cpp The Z function for finding occurences of a pattern within a piece of text with time and space complexity O(n + m)