Commit Graph

1528 Commits

Author SHA1 Message Date
Alvin Philips
1f0eff28d0
fix: Circular linked list (#1825)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

* Rewrote node struct and file structure

* Added Circular Linked List

* Update doc

* Wrote bulk of code, added documentation

* clang-format and clang-tidy fixes for 06f11f1e

* Update operations_on_datastructures/circular_linked_list.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/circular_linked_list.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 25ed3ea0

* Added parameter documentation

* Added destructor for CircularLinkedList

* Fixed memory bug

* Update circular_linked_list.cpp

* Update circular_linked_list.cpp

* Added move constructor and assignment operator

* clang-format and clang-tidy fixes for b36e4736

* Fixed copy and move operators/constructors and added documentation

* clang-format and clang-tidy fixes for 24d3b9c2

* Added missing returns

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
2021-11-02 11:03:49 -06:00
Ameya Chawla
b4b0864da1
feat: Implemented Fast Fourier Transform algorithm (#1700)
* feat ; Implemented Fast Fourier Transform

* feat : Implemented Fast Fourier Transform

* fix : added comments to header

* Fixing Code Formatter errors

* fix : updated the documentation

* fix : removed bad practice of using namespace td

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* fix : fixed the integer values with their appropriate size

* Fixed errors

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* Fixed many errors

* fix : fixed array errors

* fix: fixing memory leak errors

* fix: using delete instead of free as mentioned in errors

* fix : using delete[ ] instead of delete

* fix : fixing errors for memory leaks

* Update fast_fourier_transform.cpp

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for a6594c85

* fix : updated documentation

* fix : added time complexity in documentation

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix : update code as per the namespace numerical_methods

* fix : use of auto keyword to reduce complexity

* fix : updated documentation

* fix : fixed segmentation fault error

* fix : fixing clang-tidy errors

* fix : fixing clang-tidy errors

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* fix : updated documentation

* fix : fixing warnings

* Update fast_fourier_transform.cpp

* Update fast_fourier_transform.cpp

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 198b4297

* Update fast_fourier_transform.cpp

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* a

* Apply suggestions from code review

* fix : updating leak memeory

* Update fast_fourier_transform.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-11-02 10:52:18 -06:00
ggkogkou
8a6f2052e2
feat: Created midpoint integration numerical method (#1785)
* Created composite Simpson's numerical integration method

* Created midpoint numerical integration method

* Corrections

* Midpoint method

* Improved Documentation

* added namespace numerical_methods

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for ec5e0cce

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 7f16cc14

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update midpoint_integral_method.cpp

* All changes have been applied

* clang-format and clang-tidy fixes for 6617e060

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for a5a50f89

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 4c60e180

* Create midpoint_integral_method.cpp

* Update numerical_methods/midpoint_integral_method.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 27f76052

* Update midpoint_integral_method.cpp

Co-authored-by: ggkogkou <ggkogkou@ggkogkou.gr>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-11-01 07:56:40 -06:00
David Leal
1e8376eedb
fix: Update the CoC to match the .github repository (#1832) 2021-10-31 21:05:51 -06:00
Allen Guan
1f6c39bcf2
fix: rewrite prime numbers using linear sieve (#1810)
* fix: rewrite prime numbers using linear sieve

* fix code scanning error

* clang-format and clang-tidy fixes for 0afd463b

* fix sign-compare warning

* clang-format and clang-tidy fixes for 6ddff0f7

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-31 17:47:16 -06:00
David Leal
4e3abd4601
[feat/fix/docs]: Improvements in the backtracking folder (#1553)
* [feat/fix/docs]: Improvements in the...

...`backtracking` folder, and minor fixes in the `others/iterative_tree_traversals.cpp` and the `math/check_prime.cpp` files.

* clang-format and clang-tidy fixes for 9cc3951d

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
2021-10-29 13:05:46 -05:00
Tushar Mohan
a9312b3901
feat: a different implementation of checking bipartite-ness of a graph (#1769)
* feat: a different implementation of checking bipartite-ness of a graph

* updating DIRECTORY.md

* fix: code formatter error

* fix: requested changes

* fix: request changes

* fix : requested changed

* pass parameters by reference

* pass parameters by reference

* fix : visited to pointer

* fix : line length below 80 chars

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2021-10-27 20:48:58 -05:00
Focus
050c99eb0a
feat: added math/volume.cpp (#1796)
* feat: added math/volume.cpp

* updating DIRECTORY.md

* fix: style guide

* fix: pi define to constexpr

* fix: changed PI definition to function param

* fix: style guide

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: style guide

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: added functions to math namespace

* [fix/docs]: initialized test variables and added docs

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2021-10-26 13:19:58 +05:30
Alvin Philips
e5135d8bd8
fix: Array left rotation (#1792)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

* Rewrote array_left_rotation

* Modified doc, fixed bug in shifting logic

Fixed a mistake that would cause the array to shift incorrectly

* clang-format and clang-tidy fixes for bd135686

* Update operations_on_datastructures/array_left_rotation.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* changed int to size_t

* clang-format and clang-tidy fixes for 00e7daaf

* clang-format and clang-tidy fixes for ed2aa3a7

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
2021-10-25 23:08:12 -05:00
Lajat5
b3a0070a74
feat: Reworked/updated sorting/selection_sort.cpp. (#1613)
* Reworked selection_sort.cpp with fixes.

* Added Recursive implementation for tree traversing

* Fix #2

* Delete recursive_tree_traversals.cpp

* Update selection_sort.cpp

* Changes done in selection_sort_iterative.cpp

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 4681e4f7

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update selection_sort_iterative.cpp

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for ca2a7c64

* Finished changes requested by ayaankhan98.

* Reworked on changes.

* clang-format and clang-tidy fixes for f79b79b7

* Corrected errors.

* Fix #2

* Fix #3

* Major Fix #3

* clang-format and clang-tidy fixes for 79341db8

* clang-format and clang-tidy fixes for 9bdf2ce4

* Update selection_sort_iterative.cpp

* clang-format and clang-tidy fixes for 9833d7a7

* clang-format and clang-tidy fixes for b7726460

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
2021-10-25 13:17:33 -05:00
Alvin Philips
4d884b0dc7
fix: Union of two arrays (#1797)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

* Added reference to intersection of two arrays

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-25 11:05:11 -05:00
Focus
f3b59d173b
feat: added math/area.cpp (#1771)
* feat: added math/area.cpp

* feat: added surface area of sphere, cube and cylinder

* docs: modified @brief

* feat: changed to template functions

* test: added 2 test cases for square_area()

* test: added 3rd test case

* [test/docs] added more test cases and docs for them

* docs: added @details

* updating DIRECTORY.md

* fix: changed from math.h to cmath

Co-authored-by: David Leal <halfpacho@gmail.com>

* feat: added algorithms to the math namespace

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: call functions from the math namespace for testing

* fix: style indentation

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: style indentation

Co-authored-by: David Leal <halfpacho@gmail.com>

* feat: uses uint16_t instead of int for testing

* docs: added comments for testing variables

* fix: style guide

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-24 13:22:40 -05:00
Aayush Vyas
f821fae698
feat : add Class Based DSU for Path Compression O(1) & Union Rank O(logN) (#1571)
* Add files via upload

# Class Based DSU
-Using Path Compression to get the best time complexity O(1)
-Using Union Rank to keep track of changes using parent(p) O(logN)

* Class based DSU : Path Compression O(1) and Union Rank O(logN)

* made changes to satisfy the meets of the PR

changes made to satisfy the needs of the PR
- used base lib instead of <bits/stdc++.h>
- changed all stdin's and included pre-declared test cases

* removed stdin for testing

* changed file name from upper case to lower case

* made necessary changes

* Delete DSU_union_rank.cpp

* Delete DSU_path_compresssion.cpp

* added explicit to contructors, return 0, n=dec

* Delete dsu_path_compresssion.cpp

* added documentations, to match the typical structure

Added @brief @details @author @param @returns

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* added self-implementation test cases, changed int to uint64_t

* std::cout after assert

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for b8c37d09

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* documentation changes

* Update dsu_union_rank.cpp

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 18843179

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_path_compression.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 5c24d9a9

* Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2021-10-24 21:11:13 +05:30
Alvin Philips
5c9750d97b
fix: Intersection of two arrays (#1781)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

* Reused code from union_of_two_arrays and modified for intersection

* Fixed bug and corrected test output

* Renamed file to better meet filename guidelines

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for e653f77a

* Changed integer type from int64_t to int32_t

* Added reference to similar union_of_two_arrays file

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
2021-10-24 20:49:27 +05:30
Alvin Philips
b8d0c34126
fix: Array right rotation (#1793)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

* Rewrote array_right_rotation by modifying code from array_left_rotation

* Minor documentation changes

* clang-format and clang-tidy fixes for 16672f02

* Update operations_on_datastructures/array_right_rotation.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to size_t

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-24 14:20:34 +05:30
Alvin Philips
51e1dda02e
fix: Union of two arrays (#1794)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

* Fixed wrong integer type

Changed int64_t to int32_t

* clang-format and clang-tidy fixes for 2af706b1

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-23 19:48:26 -05:00
OM GUPTA
6c6747174c
feat: updated the Prime number checking code to make it more efficient (#1714)
* updated the code to make it more efficient

* Update math/check_prime.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/check_prime.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Apply suggestions from code review

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-22 17:07:33 +05:30
Focus
5b78538570
feat: added a1z26 cipher (#1775)
* feat: added a1z26 cipher

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 6e5b6be0

* Update ciphers/a1z26_cipher.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 36edde81

* fix: brace style

Co-authored-by: David Leal <halfpacho@gmail.com>

* [feat/fix]: uses uint8_t for maps instead of int

* clang-format and clang-tidy fixes for ef211d41

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-22 11:18:41 +05:30
Alvin Philips
00b4406bc5
fix: Union of two arrays (#1770)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

* Added namespace and print function

Added the operations_on_datastructures namespace and created a function to print a vector.

* Added implementation of union for two arrays

* Fixed bug with initialization of indexes and added test case

* Added test cases

* Modified references to const &

* Renamed file to meet filename guidelines better

* updating DIRECTORY.md

* Update operations_on_datastructures/union_of_two_arrays.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/union_of_two_arrays.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/union_of_two_arrays.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Made changes to documentation

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-21 14:21:39 -05:00
Alvin Philips
8ae862730f
fix: Missing period in the CONTRIBUTING.md file (#1772)
Missing period at the end of sentence
2021-10-20 15:13:35 -05:00
Alvin Philips
3406be6d0b
feat: Add Reverse a Binary Tree implementation (#1767)
* Create reverse_binary_tree.cpp

* Added documentation

Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT

* Added documentation

* Renamed tests to test

* Fixed issue with incorrect using statement

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fb86292d

* Added Test cases

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update operations_on_datastructures/reverse_binary_tree.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Changed int to int64_t

* Updated documentation wording

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-19 16:53:07 -05:00
Focus
692135b480
feat: added atbash cipher (#1760)
* feat: add atbash_cipher

* [test/fix]: test case expected result

* docs: added comments for main and test function

* doc: changed brief for test function

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* doc: fixed test comment

Co-authored-by: David Leal <halfpacho@gmail.com>

* [feat/fix]: made test function static

Co-authored-by: David Leal <halfpacho@gmail.com>

* doc: added author comment

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: brace style

Co-authored-by: David Leal <halfpacho@gmail.com>

* doc: modified file description and added comments for test function

* doc: added comment for #include <iostream>

Co-authored-by: David Leal <halfpacho@gmail.com>

* doc: added description of the algorithm

* Update ciphers/atbash_cipher.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update ciphers/atbash_cipher.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update ciphers/atbash_cipher.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update ciphers/atbash_cipher.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Apply suggestions from code review

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-18 19:54:00 -05:00
Soham Roy
61cbc630c3
fix: max length of arrays and coding style (#1614)
* Fixed array max length and coding style

Max length of arrays was previously an absurdly high integer, instead implemented a numerical upper bound using log2 (max depth of seg tree being logn). Removed `using namespace std;` and `typedef long long ll;` and other competitive coding practices. Added input prompts.

* Fixed remaining clang-tidy warnings

* Replaced reference parameters with const & or *

* Self-tests and documentation

* Improved documentation

* Added author names

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 10:08:42 -05:00
Tushar Mohan
72e88b30cd
feat : Implementation of stack using queue with C++ STL (#1719)
* implementation of stack using queue with C++ STL

* fix: documentation + code formatting

* updating DIRECTORY.md

* fix: changes asked

* fix : made the required changes

* fix : required changes

* fix : -is on line 38

* fix : requested changes:

* fix : self-tests added

* fix: structure of tests

* fix : requested changes

* fix : requested changes

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: RahulSethi070801 <55681359+RahulSethi070801@users.noreply.github.com>
2021-10-18 09:42:16 -05:00
Prashant Thakur
6272b2af08
feat: Modified count_set_bits.cpp (#1634)
* Modified: Replaced existing code with faster implementation

* Changed long long to "int64_t"

* Indentation Fixed.

* Modified Documentation.

* Updated authors of count_set_bits.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Apply suggestions from code review

Co-authored-by: David Leal <halfpacho@gmail.com>

* Added proper indentation in "main" function

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-16 19:57:23 -05:00
Domenic Zingsheim
27f1ed312f
feat: Add integral approximation using Monte Carlo Integration (#1742)
* feat: Add monte carlo integration

* test: Add tests for monte carlo integration

* docs: Add documentation for monte carlo integration

* updating DIRECTORY.md

* fix: Add _USE_MATH_DEFINES for windows

* fix: Comment spacing

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-15 20:34:15 -05:00
AlternateWalls
a9882e6f25
[feat/fix/docs]: Improve the Easter Determination algorithm (#1675)
* Create easter.cpp

* Update easter.cpp

* Update easter.cpp

* Update easter.cpp

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for f8e4e3fb

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update others/easter.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for aae0d475

* Update easter.cpp

* Update easter.cpp

* clang-format and clang-tidy fixes for e033f98f

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-10-15 14:05:54 -05:00
Pratyush219
95ed72a452
feat: Added implementation of FCFS CPU scheduling algorithm (#1684)
* FCFS scheduling algorithm in operating system
Added C++ implementation of FCFS scheduling algorithm in a new directory Operating-System/Scheduing-Algorithms

* Renamed files and directories to match guidelines

* Updated comments

* Added comments for member variables of FCFS class

* Deleted .vscode directory

* Replaced array of tuples with vector of tuples
Replaced formatted printf with cout and iomanip flags
Removed unused code blocks

* Replaced array of tuples with vector of tuples

* Removed nested directory

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for c95495b4

* clang-format and clang-tidy fixes for 732f247d

* Updated the documentation and used unsigned int for non-negative integers

* clang-format and clang-tidy fixes for 295f0cc6

* clang-format and clang-tidy fixes for 31f05910

* Added test cases using random number generator

* Replaced time(0) with time(nullptr)

* clang-format and clang-tidy fixes for 40d663d3

* Fixed documentation

* Rearranged code

* clang-format and clang-tidy fixes for b40a2801

* clang-format and clang-tidy fixes for 243dcc15

* Updated documentation

* clang-format and clang-tidy fixes for 899ff7ea

* Fixed some typos

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Replaced int with uint32_t in lines 259 and 263

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-15 11:34:00 -05:00
Paulo Vitor Lima Borges
bbec149f6d
feat: add prefix sum array data structure (#1663)
* feat: add prefix sum array data structure

* feat: add prefix_sum_array data structure

* updating DIRECTORY.md

* feat: Add Prefix Sum Array datastructure

* feat: Add Prefix Sum Array data structure

* Update range_queries/prefix_sum_array.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update prefix_sum_array.cpp

* Update prefix_sum_array.cpp

* Update range_queries/prefix_sum_array.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update range_queries/prefix_sum_array.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update range_queries/prefix_sum_array.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update range_queries/prefix_sum_array.cpp

* Update range_queries/prefix_sum_array.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-15 11:17:10 -05:00
Abhijeet Tiwari
2292606989
feat: kadane's algorithm added (#1669)
* feat: kadane's algorithm added

* file renamed to kadanes3.cpp and clang-tidy warnings fixed

* updating DIRECTORY.md

* DIRECTORY.md and kadanes3.cpp modified

* change integer types to int64_t and uint64_t, as per the requirements.

* clang-format and clang-tidy fixes for 5025b93a

* Apply suggestions from code review

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-15 11:15:53 -05:00
Anuran Roy
85721be69b
feat: Modify search/text_search.cpp (#1662)
* Modified search/text_search.cpp

* Added tests

* Added a few test cases

* Added a few more test cases and documentation

* Minor fix

* Minor fixes

* Minor fixes

* Minor output fixes

* Minor output fixes

* Minor readability fixes

* clang-format and clang-tidy fixes for a01765a6

* Restored original settings

* clang-format and clang-tidy fixes for 6a8f3a4e

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-14 13:34:55 -05:00
Domenic Zingsheim
5a654fb85b
feat: add geometric distribution (#1699)
* feat: add geometric distribution

* test: Add test for geometric dist

* fix: Make range_tries inclusive

* docs: Add documentation for geometric distribution

* fix: clang warnings in geometric_dist

* updating DIRECTORY.md

* fix: Remove extra line

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Remove file name

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Add return value of void function

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Add comment for test function

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Update successful test message

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Add geometric_dist namespace

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Remove extra line

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Close comment

* docs: Fix documentation

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Add const to parameter

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: Make class methods const

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-13 16:22:32 -05:00
Harsh Tripathi
89bfc1244e
fix: Armstrong number bug fixes (#1689)
* added a new directory named Recursion and a most common exxample of recusion i.e. Tower of Hanoi in it

* Added Comments

* Bug fixed according to the correct definition of armstrong_number

* Bug Fixed in armstrong_number.cpp

Bug Fixed in armstrong_number.cpp according to the correct definition of armstrong_number.

* Update armstrong_number.cpp

* Added documentation

* Delete Recursion directory

* Update armstrong_number.cpp

* Update dynamic_programming/armstrong_number.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update armstrong_number.cpp

fixed errors.

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Update armstrong_number.cpp

Applied suggested changes.

* Update armstrong_number.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-13 11:19:09 -05:00
Urwashi Kumrawat
2e6b71e206
feat: Adding switch-case and removing if-else-if (#1727)
* Adding switch-case and removing if-else-if

* [feat/fix]: Update

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-12 12:49:39 -05:00
Yaniv Hollander
7309ef1370
feat: Add the Windowed Median algorithm (#1649)
* Create windowed_median.cpp

* Update windowed_median.cpp

* Update windowed_median.cpp

* updating DIRECTORY.md

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update windowed_median.cpp

* Update windowed_median.cpp

* Update windowed_median.cpp

* Update windowed_median.cpp

* Update windowed_median.cpp

* Update windowed_median.cpp

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 7634ece0

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update probability/windowed_median.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update windowed_median.cpp

* Update windowed_median.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-06 18:55:45 -05:00
David Leal
c05b05463d
feat: Update stale workflow message (#1648) 2021-10-02 20:43:14 -05:00
Tisha Soumya
f7a5aecce5
feat: Add reverse linked list algorithim (#1596)
* add: reverse linked list algorithim

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 5cac47c9

* Update data_structures/reverse_a_linked_list.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update data_structures/reverse_a_linked_list.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update the description in data_structures/reverse_a_linked_list.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 19b4a937

* Updating data_structures/reverse_a_linked_list.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* add:test for the reversing algorithim

* fix: synatx changes

* docs :added an external link for explanation of the algorithim

* fix: suggested changes

* fix: chamges in the code

* docs : changes required in the docs

* docs :fix indentation

* fix : ouptut statement changes

* fix: clang-tidy warnings

* formatting filenames f7695035

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for f7695035

* fix : display function removed

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 38547be2

* fix: changed the data types

* clang-format and clang-tidy fixes for 3b2e68c2

* docs : documentation fixes

Co-authored-by: David Leal <halfpacho@gmail.com>

* docs : documentation changes

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 57953be1

* docs: fix changes

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for db8e74a9

* fix : display changes

Co-authored-by: ERR ! <75872316+amino19@users.noreply.github.com>

* fix : added try block

* fix: try-catch block

* fix :merge conflict

* docs:documentation changes

* added more efficient test cases

* clang-format and clang-tidy fixes for 83ee6e44

* Update data_structures/reverse_a_linked_list.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
Co-authored-by: ERR ! <75872316+amino19@users.noreply.github.com>
2021-09-26 19:03:53 -05:00
tGautot
5245b3e4a9
feat. Add SHA-1 hashing algorithm (#1609)
* feat: add sha1 algorithm

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for eb45eaef

* Added description + some clean up

* clang-format and clang-tidy fixes for fc29a370

* Improved interactive mode and added nl at eof

* Clarified includes' comments

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-09-24 14:59:26 -05:00
tGautot
404e2c15b3
feat: Add MD5 Hashing Algorithm (#1595)
* clang-format and clang-tidy fixes for 89d118bb

* feat: add md5 hashing algorithm, namespace md5

* updating DIRECTORY.md

* docs: added missing docs and cleared syntax

* Added newline at the end of file

* clang-format and clang-tidy fixes for b7b32ac7

* Comments for libs, put global funcs as static

* clang-format and clang-tidy fixes for d5da4807

* docs: added additional comments

* docs: Fixed some newlines in doxygen docs

* Changed incorrect comment

* Fixed docs & cleared potential endianness problems

* Removed useless line

* Clarified how to exit interactive mode

* Better wording

* Improved interactive mode

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-09-24 11:35:31 -05:00
Andrii Siriak
9f5bfc7230
feat: Unleash full power of the stale workflow (#1607)
Set stale bot action limit to default because it's actually GitHub API action limit and not the number of issues/PRs it marks per run as I thought

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-09-14 13:16:13 -05:00
Andrii Siriak
66331a77b4
[feat/fix]: Add working workflow for stale items (#1605)
* Create stale.yml

* Delete stale.yml

* Update stale.yml
2021-09-13 14:23:24 -05:00
Mayank Mamgain
040237d41a
feat: Add Travelling Salesman Problem(Naive Approach) (#1590)
* Add Travelling Salesman Problem(Naive Approach)

* Change header and add reference in Travelling Salesman problem

* feat: Add travelling salesman problem(Naive Approach)

* feat: Add travelling salesman problem.

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* feat: Add Travelling Salesman Problem

* feat: Add Travelling Salesman Problem

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* feat: Add travelling salesman problem

* fix: Hopefully fix Ci errors

* Update graph/travelling_salesman_problem.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 56dc1e90

* feat: Add travelling salesman problem.

* feat: Add travelling salesman problem

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-12 12:19:06 -05:00
Tushar Khanduri
ea9ae3a91b
feat: Add the Selection Sort Recursive algorithm (#1578)
* Create selection_sort_recursive.cpp

* updating DIRECTORY.md

* Add: Description of Algorithm

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 8f466c86

* Apply suggestions from code review

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update selection_sort_recursive.cpp

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for bfda3660

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_recursive.cpp

Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2021-09-05 23:20:51 +05:30
Jxtopher
a6bbe050f7
fix: Add return 0 in bactracking/magic_sequence.cpp (#1589)
* Update magic_sequence.cpp

* clang-format and clang-tidy fixes for ff127de6

* Update backtracking/magic_sequence.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-09-05 12:37:31 -05:00
RitikaGupta8734
b82e2cd4e7
feat: added z_algorithm in strings (#1581)
* feat: added z_algorithm in strings

* Updated z_function.cpp 

Updated z_function.cpp as per contribution guidelines.
Fixed Link using github markdown syntax
Created a separate function for tests and covered the corner case

* Apply suggestions from code review

More comments added to the code

Co-authored-by: David Leal <halfpacho@gmail.com>

* Apply suggestions from code review

Some more documentation added as per contribution guidelines.

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

comments added

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 0c7515e9

* Updated int -> uint64_t 

Updated int -> uint64_t for non-negative values

* clang-format and clang-tidy fixes for 12d51239

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* More comments added

* clang-format and clang-tidy fixes for 8a627ac9

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update strings/z_function.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-04 12:39:19 +05:30
ERR !
341ed50da8
feat: Finding no. of digits in a Number (#1497)
* Finding no. of digits in a Number

* Initialize n

* Initialize n as int

* Changes done

* Changes done with codes by adding more comments

* Changes done with codes by adding name as md

* Modified comments

* add void

* remove void & update comments

* Set some changes to pass Awesome CI Workflow

* add return 0 & file name in lower case

* Changes done..

* Update finding_number_of_Digits_in_a_Number.cpp

* Update finding_number_of_Digits_in_a_Number.cpp

* Update finding_number_of_Digits_in_a_Number.cpp

* formatting filenames 0ec45e33

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 0ec45e33

* clang-format and clang-tidy fixes for 9c0a437e

* updating DIRECTORY.md

* Wrote test, needs review

* [fix/docs]: Fix tests/code and add documentation

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-03 14:49:37 -05:00
Aaron
289ebc5c67
fix: typo in README.md (#1582) 2021-09-01 17:33:56 -05:00
Bensuperpc
f7d656cb17
feat: Add inverse inverse root functions (#1570)
* Add inverse inverse root function

Add inverse inverse root function

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Update comment

Update comment

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Update math/inv_sqrt.cpp

Change to IO operations

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/inv_sqrt.cpp

Update comment

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/inv_sqrt.cpp

Update comment

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Fix fist warning

Fix fist warning

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Fix warning N2

Fix warning N2

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Fix warning N3

Fix warning N3

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Fix warning N4

Fix warning N4

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* updating DIRECTORY.md

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for 1acc7773

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Add tests and improve comment

Add tests and improve comment

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Add default template type (double)

Add default template type (double)

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Update comment

Update comment

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* Update math/inv_sqrt.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Add comments

Add comments

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>

* updating DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-01 11:20:01 -05:00
Riti Kumari
70868f2b5e
feat: add manacher's algorithm (#1577)
* feat: add manacher algorithm in strings/

* fix: directory.md format

* fix: add test cases, fix clang-tidy warning, implement requested changes

* fix: update comments

* fix: update int to uint64_t, add suggested changes

* fix: update description
2021-08-31 11:47:59 +05:30
Ashish Bhanu Daulatabad
88394665b4
[feat/fix]: A Star Search Improvement (#1566)
* A Star Search Improvement

* A Star Search Improvement - 2

* A Star Search Improvement - 3

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-08-27 12:50:40 -05:00