Commit Graph

1550 Commits

Author SHA1 Message Date
ggkogkou
4c60e180aa
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-28 12:10:52 +03:00
github-actions
1a9dbc0295 clang-format and clang-tidy fixes for a5a50f89 2021-10-28 09:09:48 +00:00
ggkogkou
a5a50f89a9
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-28 12:09:07 +03:00
ggkogkou
b1e3a81eab
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-28 12:08:50 +03:00
github-actions
6b04043b2a clang-format and clang-tidy fixes for 6617e060 2021-10-27 21:19:35 +00:00
ggkogkou
6617e060f1
All changes have been applied 2021-10-28 00:18:51 +03:00
ggkogkou
7af9b8fd58
Update midpoint_integral_method.cpp 2021-10-28 00:08:03 +03:00
ggkogkou
2e9edaf260
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-28 00:06:47 +03:00
github-actions
c76e97f010 clang-format and clang-tidy fixes for 7f16cc14 2021-10-27 20:23:13 +00:00
ggkogkou
7f16cc1413
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-27 23:08:28 +03:00
github-actions
d4fe67e857 clang-format and clang-tidy fixes for ec5e0cce 2021-10-27 20:07:34 +00:00
github-actions
b072f8e99d updating DIRECTORY.md 2021-10-27 20:07:27 +00:00
ggkogkou
ec5e0cce91
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-27 23:06:31 +03:00
ggkogkou
ab4c1242dd
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-27 23:06:22 +03:00
ggkogkou
f9cdf59a62
Update numerical_methods/midpoint_integral_method.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-27 23:06:14 +03:00
David Leal
9a782651c4
Merge branch 'master' into midpoint_branch 2021-10-27 13:54:38 -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
ggkogkou
71722d5884 added namespace numerical_methods 2021-10-23 15:38:42 +03:00
ggkogkou
cecc7f493b Merge branch 'midpoint_branch' of https://github.com/ggkogkou/C-Plus-Plus into midpoint_branch 2021-10-22 23:26:32 +03:00
ggkogkou
cf971fad29 Merge branch 'master' of https://github.com/TheAlgorithms/C-Plus-Plus into midpoint_branch 2021-10-22 23:26:22 +03:00
ggkogkou
7b554f8080 Improved Documentation 2021-10-22 23:25:41 +03:00
David Leal
f63fa76a2b
Merge branch 'master' into midpoint_branch 2021-10-22 12:33:50 -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
ggkogkou
43f0fc5f69
Merge branch 'master' into midpoint_branch 2021-10-21 23:25:30 +03:00
ggkogkou
387218e081 Midpoint method 2021-10-21 22:55:15 +03:00
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
ggkogkou
5325536b2e Merge branch 'master' of https://github.com/TheAlgorithms/C-Plus-Plus 2021-10-21 01:24:37 +03: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
ggkogkou
bcb6fa0a41 Corrections 2021-10-20 15:58:56 +03:00
ggkogkou
0f21169b94 Merge https://github.com/ggkogkou/C-Plus-Plus 2021-10-20 15:46:08 +03:00
ggkogkou
ee0022b92a Created midpoint numerical integration method 2021-10-20 15:45:10 +03:00
ggkogkou
aea865f8e4
Merge branch 'master' into master 2021-10-20 15:38:51 +03:00
ggkogkou
dd0228dc41 Created composite Simpson's numerical integration method 2021-10-20 15:31:10 +03: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