Skip to content

Commit 0aee341

Browse files
Merge branch 'master' into add/number_of_paths
2 parents 65e03d6 + 769b3c7 commit 0aee341

File tree

126 files changed

+7162
-36250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+7162
-36250
lines changed

.github/workflows/gh-pages.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Doxygen CI
22

3-
on:
3+
on:
44
push:
55
branches: [master]
66

@@ -15,7 +15,7 @@ jobs:
1515
run: |
1616
brew install graphviz ninja doxygen
1717
- name: configure
18-
run: cmake -G Ninja -B ./build -S .
18+
run: cmake -G Ninja -Duse_libclang=ON -DCMAKE_CXX_COMPILER=clang++ -B ./build -S .
1919
- name: build
2020
run: cmake --build build -t doc
2121
- name: gh-pages
@@ -28,7 +28,7 @@ jobs:
2828
git config --global user.name "$GITHUB_ACTOR"
2929
git config --global user.email "[email protected]"
3030
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
31-
rm -rf d* && rm *.html && rm *.svg && rm *.map && rm *.md5 && rm *.png && rm *.js && rm *.css
31+
rm -rf d* && rm *.html && rm *.svg && rm *.map && rm *.md5 && rm *.png && rm *.js
3232
git add .
3333
cp -rp ./build/html/* . && rm -rf ./build && ls -lah
3434
git add .

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,9 @@ a.out
3434
*.out
3535
*.app
3636

37+
# Cache
38+
.cache/
39+
40+
# Build
3741
build/
3842
git_diff.txt

CMakeLists.txt

+19-31
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
cmake_minimum_required(VERSION 3.22)
2-
project(Algorithms_in_C++
2+
project(TheAlgorithms/C++
33
LANGUAGES CXX
44
VERSION 1.0.0
55
DESCRIPTION "Set of algorithms implemented in C++."
66
)
77

8-
# set(CMAKE_CXX_CPPLINT "~/anaconda3/bin/cpplint --filter=-legal/copyright --std=c++11")
9-
# find_program(CLANG_FORMAT "clang-format")
10-
11-
set(CMAKE_CXX_STANDARD 11)
8+
# C++ standard
9+
set(CMAKE_CXX_STANDARD 17)
1210
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1311

12+
# Additional warnings and errors
1413
if(MSVC)
15-
# set(CMAKE_CXX_STANDARD 14)
1614
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
17-
endif(MSVC)
15+
add_compile_options(/W4 /permissive-)
16+
else()
17+
add_compile_options(-Wall -Wextra -Wno-register -Werror=vla)
18+
endif()
1819

1920
option(USE_OPENMP "flag to use OpenMP for multithreading" ON)
2021
if(USE_OPENMP)
@@ -38,6 +39,10 @@ add_subdirectory(graphics)
3839
add_subdirectory(probability)
3940
add_subdirectory(backtracking)
4041
add_subdirectory(bit_manipulation)
42+
add_subdirectory(dynamic_programming)
43+
add_subdirectory(greedy_algorithms)
44+
add_subdirectory(range_queries)
45+
add_subdirectory(operations_on_datastructures)
4146
add_subdirectory(data_structures)
4247
add_subdirectory(machine_learning)
4348
add_subdirectory(numerical_methods)
@@ -49,47 +54,30 @@ add_subdirectory(physics)
4954

5055
cmake_policy(SET CMP0054 NEW)
5156
cmake_policy(SET CMP0057 NEW)
57+
5258
find_package(Doxygen OPTIONAL_COMPONENTS dot dia)
53-
if(DOXYGEN_FOUND)
54-
set(DOXYGEN_GENERATE_MAN NO)
55-
set(DOXYGEN_USE_MATHJAX YES)
56-
set(DOXYGEN_GENERATE_HTML YES)
57-
# set(DOXYGEN_HTML_TIMESTAMP YES)
58-
set(DOXYGEN_EXTRACT_STATIC YES)
59-
set(DOXYGEN_INLINE_SOURCES YES)
60-
set(DOXYGEN_CREATE_SUBDIRS YES)
61-
set(DOXYGEN_EXTRACT_PRIVATE YES)
62-
set(DOXYGEN_GENERATE_TREEVIEW YES)
63-
set(DOXYGEN_STRIP_CODE_COMMENTS NO)
64-
set(DOXYGEN_EXT_LINKS_IN_WINDOW YES)
65-
set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
66-
set(DOXYGEN_EXCLUDE_PATTERNS */build/*)
67-
set(DOXYGEN_ENABLE_PREPROCESSING YES)
68-
set(DOXYGEN_CLANG_ASSISTED_PARSING YES)
69-
set(DOXYGEN_FILE_PATTERNS *.cpp *.h *.hpp *.md)
70-
set(DOXYGEN_MATHJAX_EXTENSIONS TeX/AMSmath TeX/AMSsymbols)
71-
set(DOXYGEN_TAGFILES "doc/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/")
59+
if(DOXYGEN_FOUND)
7260
if(MSVC)
7361
set(DOXYGEN_CPP_CLI_SUPPORT YES)
7462
endif()
75-
set(DOXYGEN_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML")
63+
7664
if(Doxygen_dot_FOUND)
7765
set(DOXYGEN_HAVE_DOT YES)
78-
set(DOXYGEN_CALL_GRAPH YES)
79-
set(DOXYGEN_INTERACTIVE_SVG YES)
80-
set(DOXYGEN_DOT_IMAGE_FORMAT "svg")
8166
endif()
67+
8268
if(OPENMP_FOUND)
8369
set(DOXYGEN_PREDEFINED "_OPENMP=1")
8470
endif()
71+
8572
if(GLUT_FOUND)
8673
set(DOXYGEN_PREDEFINED ${DOXYGEN_PREDEFINED} "GLUT_FOUND=1")
8774
endif()
8875

8976
doxygen_add_docs(
9077
doc
91-
${PROJECT_SOURCE_DIR}
78+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
9279
COMMENT "Generate documentation"
80+
CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile
9381
)
9482
endif()
9583

DIRECTORY.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
## Cpu Scheduling Algorithms
4343
* [Fcfs Scheduling](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/cpu_scheduling_algorithms/fcfs_scheduling.cpp)
44+
* [Non Preemptive Sjf Scheduling](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/cpu_scheduling_algorithms/non_preemptive_sjf_scheduling.cpp)
4445

4546
## Data Structures
4647
* [Avltree](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/data_structures/avltree.cpp)
@@ -94,7 +95,7 @@
9495
## Dynamic Programming
9596
* [0 1 Knapsack](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/0_1_knapsack.cpp)
9697
* [Abbreviation](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/abbreviation.cpp)
97-
* [Armstrong Number](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/armstrong_number.cpp)
98+
* [Armstrong Number Templated](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/armstrong_number_templated.cpp)
9899
* [Bellman Ford](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/bellman_ford.cpp)
99100
* [Catalan Numbers](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/catalan_numbers.cpp)
100101
* [Coin Change](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/coin_change.cpp)
@@ -106,11 +107,10 @@
106107
* [Floyd Warshall](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/floyd_warshall.cpp)
107108
* [House Robber](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/house_robber.cpp)
108109
* [Kadane](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/kadane.cpp)
109-
* [Kadane2](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/kadane2.cpp)
110110
* [Longest Common String](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/longest_common_string.cpp)
111111
* [Longest Common Subsequence](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/longest_common_subsequence.cpp)
112112
* [Longest Increasing Subsequence](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/longest_increasing_subsequence.cpp)
113-
* [Longest Increasing Subsequence (Nlogn)](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/longest_increasing_subsequence_(nlogn).cpp)
113+
* [Longest Increasing Subsequence Nlogn](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/longest_increasing_subsequence_nlogn.cpp)
114114
* [Longest Palindromic Subsequence](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/longest_palindromic_subsequence.cpp)
115115
* [Matrix Chain Multiplication](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/matrix_chain_multiplication.cpp)
116116
* [Maximum Circular Subarray](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/maximum_circular_subarray.cpp)
@@ -119,9 +119,10 @@
119119
* [Partition Problem](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/partition_problem.cpp)
120120
* [Searching Of Element In Dynamic Array](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/searching_of_element_in_dynamic_array.cpp)
121121
* [Shortest Common Supersequence](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/shortest_common_supersequence.cpp)
122-
* [Subset Sum](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/subset_sum.cpp)
122+
* [Subset Sum Dynamic](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/subset_sum_dynamic.cpp)
123123
* [Trapped Rainwater](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/trapped_rainwater.cpp)
124124
* [Tree Height](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/tree_height.cpp)
125+
* [Unbounded 0 1 Knapsack](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/unbounded_0_1_knapsack.cpp)
125126
* [Word Break](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/dynamic_programming/word_break.cpp)
126127

127128
## Games
@@ -160,9 +161,10 @@
160161
* [Spirograph](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/graphics/spirograph.cpp)
161162

162163
## Greedy Algorithms
164+
* [Binary Addition](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/binary_addition.cpp)
163165
* [Boruvkas Minimum Spanning Tree](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/boruvkas_minimum_spanning_tree.cpp)
164166
* [Digit Separation](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/digit_separation.cpp)
165-
* [Dijkstra](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/dijkstra.cpp)
167+
* [Dijkstra Greedy](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/dijkstra_greedy.cpp)
166168
* [Gale Shapley](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/gale_shapley.cpp)
167169
* [Huffman](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/huffman.cpp)
168170
* [Jump Game](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/greedy_algorithms/jump_game.cpp)
@@ -304,6 +306,7 @@
304306
* [Lfu Cache](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/lfu_cache.cpp)
305307
* [Longest Substring Without Repeating Characters](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/longest_substring_without_repeating_characters.cpp)
306308
* [Lru Cache](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/lru_cache.cpp)
309+
* [Lru Cache2](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/lru_cache2.cpp)
307310
* [Matrix Exponentiation](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/matrix_exponentiation.cpp)
308311
* [Palindrome Of Number](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/palindrome_of_number.cpp)
309312
* [Paranthesis Matching](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/others/paranthesis_matching.cpp)
@@ -337,10 +340,9 @@
337340
* [Persistent Seg Tree Lazy Prop](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/range_queries/persistent_seg_tree_lazy_prop.cpp)
338341
* [Prefix Sum Array](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/range_queries/prefix_sum_array.cpp)
339342
* [Segtree](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/range_queries/segtree.cpp)
340-
* [Sparse Table](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/range_queries/sparse_table.cpp)
343+
* [Sparse Table Range Queries](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/range_queries/sparse_table_range_queries.cpp)
341344

342345
## Search
343-
* [Longest Increasing Subsequence Using Binary Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/Longest_Increasing_Subsequence_using_binary_search.cpp)
344346
* [Binary Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/binary_search.cpp)
345347
* [Exponential Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/exponential_search.cpp)
346348
* [Fibonacci Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/fibonacci_search.cpp)
@@ -350,6 +352,7 @@
350352
* [Interpolation Search2](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/interpolation_search2.cpp)
351353
* [Jump Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/jump_search.cpp)
352354
* [Linear Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/linear_search.cpp)
355+
* [Longest Increasing Subsequence Using Binary Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/longest_increasing_subsequence_using_binary_search.cpp)
353356
* [Median Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/median_search.cpp)
354357
* [Median Search2](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/median_search2.cpp)
355358
* [Saddleback Search](https://github.com/TheAlgorithms/C-Plus-Plus/blob/HEAD/search/saddleback_search.cpp)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This repository is a collection of open-source implementation of a variety of al
2222
* Well documented source code with detailed explanations provide a valuable resource for educators and students alike.
2323
* Each source code is atomic using [STL classes](https://en.wikipedia.org/wiki/Standard_Template_Library) and _no external libraries_ are required for their compilation and execution. Thus, the fundamentals of the algorithms can be studied in much depth.
2424
* Source codes are [compiled and tested](https://github.com/TheAlgorithms/C-Plus-Plus/actions?query=workflow%3A%22Awesome+CI+Workflow%22) for every commit on the latest versions of three major operating systems viz., Windows, MacOS, and Ubuntu (Linux) using MSVC 19 2022, AppleClang 14.0.0, and GNU 11.3.0 respectively.
25-
* Strict adherence to [C++11](https://en.wikipedia.org/wiki/C%2B%2B11) standard ensures portability of code to embedded systems as well like ESP32, ARM Cortex, etc. with little to no changes.
25+
* Strict adherence to [C++17](https://en.wikipedia.org/wiki/C%2B%2B17) standard ensures portability of code to embedded systems as well like [ESP32](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/cplusplus.html#c-language-standard), [ARM Cortex](https://developer.arm.com/documentation/101458/2404/Standards-support/Supported-C-C---standards-in-Arm-C-C---Compiler), etc. with little to no changes.
2626
* Self-checks within programs ensure correct implementations with confidence.
2727
* Modular implementations and OpenSource licensing enable the functions to be utilized conveniently in other applications.
2828

backtracking/subarray_sum.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
#include <cassert> /// for assert
17+
#include <cstdint>
1718
#include <iostream> /// for IO operations
1819
#include <unordered_map> /// for unordered_map
1920
#include <vector> /// for std::vector

backtracking/subset_sum.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
#include <cassert> /// for assert
13+
#include <cstdint>
1314
#include <iostream> /// for IO operations
1415
#include <vector> /// for std::vector
1516

backtracking/wildcard_matching.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313

1414
#include <cassert> /// for assert
15+
#include <cstdint>
1516
#include <iostream> /// for IO operations
1617
#include <vector> /// for std::vector
1718

bit_manipulation/count_bits_flip.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* @author [Yash Raj Singh](https://github.com/yashrajyash)
2121
*/
2222
#include <cassert> /// for assert
23+
#include <cstdint>
2324
#include <iostream> /// for IO operations
2425
/**
2526
* @namespace bit_manipulation

bit_manipulation/count_of_set_bits.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* @author [Prashant Thakur](https://github.com/prashant-th18)
1717
*/
1818
#include <cassert> /// for assert
19+
#include <cstdint>
1920
#include <iostream> /// for IO operations
2021
/**
2122
* @namespace bit_manipulation

bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
#include <cassert> /// for assert
21+
#include <cstdint>
2122
#include <iostream> /// for IO operations
2223

2324
/**

bit_manipulation/hamming_distance.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414

1515
#include <cassert> /// for assert
16+
#include <cstdint>
1617
#include <iostream> /// for io operations
1718

1819
/**

bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include <cassert> /// for assert
19+
#include <cstdint>
1920
#include <iostream> /// for IO operations
2021

2122
/**

bit_manipulation/power_of_2.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include <cassert> /// for assert
19+
#include <cstdint>
1920
#include <iostream> /// for IO operations
2021

2122
/**

bit_manipulation/set_kth_bit.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
#include <cassert> /// for assert
22+
#include <cstdint>
2223
#include <iostream> /// for IO operations
2324

2425
/**

bit_manipulation/travelling_salesman_using_bit_manipulation.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*/
2323
#include <algorithm> /// for std::min
2424
#include <cassert> /// for assert
25+
#include <cstdint>
2526
#include <iostream> /// for IO operations
2627
#include <limits> /// for limits of integral types
2728
#include <vector> /// for std::vector

ciphers/base64_encoding.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414
#include <array> /// for `std::array`
1515
#include <cassert> /// for `assert` operations
16+
#include <cstdint>
1617
#include <iostream> /// for IO operations
1718

1819
/**

ciphers/hill_cipher.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
#include <cassert>
3737
#include <cmath>
38+
#include <cstdint>
3839
#include <cstring>
3940
#include <ctime>
4041
#include <fstream>

ciphers/uint128_t.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#include <algorithm> /// for `std::reverse` and other operations
11+
#include <cstdint>
1112
#include <ostream> /// for `std::cout` overload
1213
#include <string> /// for `std::string`
1314
#include <utility> /// for `std::pair` library

cpu_scheduling_algorithms/fcfs_scheduling.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <algorithm> /// for sorting
1313
#include <cassert> /// for assert
14+
#include <cstdint>
1415
#include <cstdlib> /// random number generation
1516
#include <ctime> /// for time
1617
#include <iomanip> /// for formatting the output

0 commit comments

Comments
 (0)