Commit Graph

1552 Commits

Author SHA1 Message Date
Ameya Chawla
ad7915cdb9
fix : fixing clang-tidy errors 2021-10-22 11:00:42 +05:30
Ameya Chawla
5c1c4a4a3e
fix : fixed segmentation fault error 2021-10-22 09:55:19 +05:30
Ameya Chawla
41eaa0fb49
fix : updated documentation 2021-10-21 23:22:29 +05:30
Ameya Chawla
b51c54be13
fix : use of auto keyword to reduce complexity 2021-10-21 15:58:57 +05:30
Ameya Chawla
8b974add64
fix : update code as per the namespace numerical_methods 2021-10-21 08:20:27 +05:30
Ameya Chawla
3b31104a8b
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-21 08:12:13 +05:30
Ameya Chawla
b5eabc1196
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-21 08:11:58 +05:30
Ameya Chawla
6a9b4a312b
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-21 08:11:47 +05:30
Ameya Chawla
7cccbd3d87
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-21 08:10:48 +05:30
David Leal
20274510c4
Merge branch 'master' into master 2021-10-20 15:20:23 -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
Ameya Chawla
800730ab61
fix : added time complexity in documentation 2021-10-21 00:46:37 +05:30
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
Ameya Chawla
f64ed1f1a2
fix : updated documentation 2021-10-19 20:05:44 +05:30
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
github-actions
a8a3f7c6fc clang-format and clang-tidy fixes for a6594c85 2021-10-18 18:26:29 +00:00
Ameya Chawla
a6594c85c0
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 23:55:35 +05:30
Ameya Chawla
501fd26f22
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 22:44:18 +05:30
Ameya Chawla
4f178cfd0c
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 22:44:10 +05:30
Ameya Chawla
93adc8b9de
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 22:43:57 +05:30
David Leal
8cdfd84c98
Merge branch 'master' into master 2021-10-18 11:55:42 -05:00
Ameya Chawla
0b90130a7a
Update fast_fourier_transform.cpp 2021-10-18 21:57:08 +05:30
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
Ameya Chawla
b5326c805d
fix : fixing errors for memory leaks 2021-10-18 10:05:57 +05:30
Ameya Chawla
be85486264
fix : using delete[ ] instead of delete 2021-10-18 10:00:36 +05:30
Ameya Chawla
5d89fff356
fix: using delete instead of free as mentioned in errors 2021-10-18 09:48:05 +05:30
Ameya Chawla
9b307dc144
fix: fixing memory leak errors 2021-10-18 09:36:14 +05:30
Ameya Chawla
5c23325ac5
fix : fixed array errors 2021-10-18 09:09:04 +05:30
Ameya Chawla
761eb5cdfa
Fixed many errors 2021-10-18 08:40:00 +05:30
Ameya Chawla
2b84683f02
Update fast_fourier_transform.cpp 2021-10-18 02:02:52 +05:30
Ameya Chawla
c813d4fbb6
Update fast_fourier_transform.cpp 2021-10-18 01:55:36 +05:30
Ameya Chawla
0828a87813
Fixed errors 2021-10-18 01:42:00 +05:30
Ameya Chawla
bb175dafe6
fix : fixed the integer values with their appropriate size 2021-10-18 01:17:11 +05:30
github-actions
e237599839 updating DIRECTORY.md 2021-10-17 19:33:36 +00:00
Ameya Chawla
a50aaa49fc
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 01:02:49 +05:30
Ameya Chawla
713f25c931
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 01:02:28 +05:30
Ameya Chawla
280ddf46b9
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 01:02:17 +05:30
Ameya Chawla
d079f9d43e
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 01:02:09 +05:30
Ameya Chawla
d361ff5131
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 01:01:56 +05:30
Ameya Chawla
ad26efdf9a
Update numerical_methods/fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-10-18 01:01:41 +05:30
David Leal
d1cb53379e
Merge branch 'master' into master 2021-10-17 14:04:35 -05:00
Ameya Chawla
2e8077fbb3
fix : removed bad practice of using namespace td 2021-10-17 23:21:23 +05:30
Ameya Chawla
748ba48e9d
fix : updated the documentation 2021-10-17 23:12:52 +05:30
Ameya Chawla
89b2ce7b10
Fixing Code Formatter errors 2021-10-17 23:00:58 +05:30
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