Commit Graph

98 Commits

Author SHA1 Message Date
Mindaugas
29f54393f3
feat: add Stooge sort algorithm (#2440)
* feat: add Stooge sort algorithm

* docs: add documentation for function parameters and includes

* test: add new tests for the Stooge sort

* docs: Update functions descriptions

* fix: Update parameter type to size_t

* doc: Add message that the tests have passed

* fix: Update return statement structure

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-04-14 17:53:25 -06:00
David Leal
1371b5390a
[feat/docs]: improve the quick_sort.cpp algorithm (#2396)
* [feat/docs]: improve the `quick_sort.cpp`...

...algorithm implementation.

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

* chore(fix): add original author

* updating DIRECTORY.md
2022-12-01 11:29:28 -06:00
Arjit Malik
969b447773
docs: updated a logically wrong doc comment (#2329) 2022-10-25 19:55:21 -05:00
David Leal
84ff18e0ac
fix: quick_sort_3.cpp warning (#2070)
* fix: `quick_sort_3.cpp` warning

* clang-format and clang-tidy fixes for d95ac026
2022-10-04 10:06:15 -05:00
Chen Anxue
37a29008e6
docs: fix small typo (#1938) 2022-03-01 08:24:07 -06:00
Siddhartha Shankar Padhy
e6b17203c7
feat: add binary_insertion_sort (#1850)
* Add binary_insertion_sort.cpp

* Update binary_insertion_sort.cpp

* Update sorting/binary_insertion_sort.cpp

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

* Update binary_insertion_sort.cpp

* Update binary_insertion_sort.cpp

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for d48126b7

* clang-format and clang-tidy fixes for 30cafcab

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>
2022-01-11 12:39:41 -06: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
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
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
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
Sujal Gupta
c3b07aed22
feat: add dnf sort (#1558)
* add dnf sort

* refactored code

* remove extra empty lines

* add tests

* update date type for non-negative values

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* Update sorting/dnf_sort.cpp

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

* updating DIRECTORY.md

* Update sorting/dnf_sort.cpp

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

* update data type for variables

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-08-19 17:55:13 +05:30
Swastika Gupta
f34f93e77a
feat: Add the Subarray Sum implementation (#1527)
* Create subarray_sum.cpp

* updating DIRECTORY.md

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

* Update backtracking/subarray_sum.cpp

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

* clang-format and clang-tidy fixes for f37f7b7c

* Update backtracking/subarray_sum.cpp

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

* Update backtracking/subarray_sum.cpp

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

* Update subarray_sum.cpp

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

* Update backtracking/subarray_sum.cpp

* Update backtracking/subarray_sum.cpp

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

* Update backtracking/subarray_sum.cpp

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

* Update backtracking/subarray_sum.cpp

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

* clang-format and clang-tidy fixes for 047366a8

* Update subarray_sum.cpp

* clang-format and clang-tidy fixes for 512b1887

* Update backtracking/subarray_sum.cpp

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

* Update backtracking/subarray_sum.cpp

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

* Update backtracking/subarray_sum.cpp

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

* Update backtracking/subarray_sum.cpp

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

* fix: Apply suggestions from code review

* docs: Apply suggestions from code review

* clang-format and clang-tidy fixes for e6979047

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-21 14:22:16 -05:00
Swastika Gupta
7bab516e59
feat: Add the Wave Sort algorithm (#1525)
* Create wave_sort.cpp

* Update wave_sort.cpp

* Update wave_sort.cpp

* Update wave_sort.cpp

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 196165e7

* Update wave_sort.cpp

* Update sorting/wave_sort.cpp

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

* Update sorting/wave_sort.cpp

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

* Update sorting/wave_sort.cpp

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

* Update wave_sort.cpp

* clang-format and clang-tidy fixes for b5f9663f

* Update sorting/wave_sort.cpp

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

* Update sorting/wave_sort.cpp

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

* clang-format and clang-tidy fixes for 8651884e

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-16 13:41:54 -05:00
Swastika Gupta
82290e72c5
tests: Add test in cycle_sort.cpp (#1520)
* Update cycle_sort.cpp

* Update sorting/cycle_sort.cpp

Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>

* Update sorting/cycle_sort.cpp

Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>

* clang-format and clang-tidy fixes for 2601c621

* Update cycle_sort.cpp

* Update cycle_sort.cpp

* Update cycle_sort.cpp

* clang-format and clang-tidy fixes for 39cf3f34

* Update sorting/cycle_sort.cpp

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

* Update cycle_sort.cpp

* Update cycle_sort.cpp

Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-12 19:50:56 -05:00
Nitin Sharma
60ee52fd6a
feat: add random pivot quick sort algorithm (#1510)
* feat: add random pivot quick sort algorithm, test cases included

* updating DIRECTORY.md

* docs: add proper docs for random pivot quick sort algorithm, code reformatted.

* fix: copy constructor bug fixed for TestCase class for random pivot quick sort algo

* docs and code reformatted according to standards

* c-style array declarations removed

* added minor suggestion in docs

* resource link added in docs

* docs formatted

* test function's docs added, using stl function for swap

* generator function migrated to namespace

* Update sorting/random_pivot_quick_sort.cpp

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

* Update sorting/random_pivot_quick_sort.cpp

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

* Update sorting/random_pivot_quick_sort.cpp

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

* docs fixed sorting/random pivot quick sort

* 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-07-06 22:49:27 +05:30
Aditya Prakash
a9d33871a9
feat: Added Recursive Bubble Sort (#1487)
* feat: Added recursive bubble sort

* updating DIRECTORY.md

* fixed clang-tidy warnings

* fixed swap function

* improved documentation

* Reworked documentation

* reworked documentation

* fixed ubuntu compile errors

* Enhanced documentation

* Apply suggestions from code review

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

* Added explanation link and fixed documentation

* Added explanation link and fixed documentation

* Update settings.json

Removed `"cmake.configureOnOpen": false`

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Update recursive_bubble_sort.cpp

Removed the `swap` function

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Update recursive_bubble_sort.cpp

Replaced `int` with `uint64_t`

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-05-15 11:13:39 +05:30
Uvaish Zafri
97896f852e Updated comb_sort.cpp 2021-02-11 20:53:16 +05:30
Rakshit Raj
1f5ca99571
feat: Add sorting/count_inversions.cpp (#1425)
* Create count_inversions.cpp

Counts the number of inversions in a list using merge sort. The number of Inversions in a list is the measure of the list's proximity to being sorted in ascending/increasing order.

* Update count_inversions.cpp

- fixed template error on line 156
- an added test case for character array
- an added test case for list type double

* Update sorting/count_inversions.cpp

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update sorting/count_inversions.cpp

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>

* Update sorting/count_inversions.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for b51af5e8

* using `uint64_t` from cstdint header 

and doxygen formatiing

* clang-format and clang-tidy fixes for 047578bb

* Update count_inversions.cpp

* added comments on imports

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update count_inversions.cpp

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update sorting/count_inversions.cpp

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

* Update count_inversions.cpp

* clang-format and clang-tidy fixes for 121ce330

* Update sorting/count_inversions.cpp

Co-authored-by: John Law <johnlaw.po@gmail.com>

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
2020-12-15 20:33:04 -06:00
Kaustubh Damania
67e26cfbae
feat: Add ncr mod p code (#1325)
* feat: Add ncr mod p code (#1323)

* Update math/ncr_modulo_p.cpp

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

* Added all functions inside a class + added more asserts

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for f6df24a5

* Replace int64_t to uint64_t + add namespace + detailed documentation

* clang-format and clang-tidy fixes for e09a0579

* Add extra namespace + add const& in function arguments

* clang-format and clang-tidy fixes for 8111f881

* Update ncr_modulo_p.cpp

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

* Update math/ncr_modulo_p.cpp

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

* Update math/ncr_modulo_p.cpp

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

* Update math/ncr_modulo_p.cpp

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

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for a8401d4b

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-11-22 23:05:01 +05:30
Suyash Jaiswal
5bd438066c
feat: Add sorting/radix_sort2.cpp (#1268)
* radix_sort2.cpp

* Performed changes in radix_sort2.cpp

* Update sorting/radix_sort2.cpp

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

* Update sorting/radix_sort2.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for e01027fa

* update radix_sort2.cpp

* Update sorting/radix_sort2.cpp

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

* Update sorting/radix_sort2.cpp

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

* Update sorting/radix_sort2.cpp

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

* Update sorting/radix_sort2.cpp

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

* update radix_sort2.cpp

* update radix_sort2.cpp

* update radix_sort2.cpp

* update radix_sort2.cpp

* update radix_sort2.cpp

* update radix_sort2.cpp

* update radix_sort2.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-11-02 14:40:53 -06:00
Roshan Kanwar
e44943aadb
feat: add wiggle sort algorithm (#1265)
* create wiggle_sort.cpp

* used array instead of vector

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* updating DIRECTORY.md

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* removed swap function and used std::swap

* update wiggle_sort.cpp

* update wiggle_sort.cpp

* Update wiggle_sort.cpp

* Update wiggle_sort.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-28 22:51:49 +05:30
Tsung-Han Ho
b1079da17d
feat: add cycle sort algorithm (#1252)
* feat: add cycle sort algorithm

* feat: add cycle sort algorithm

* feat: add cycle sort algorithm

* feat: add cycle sort algorithm

* feat: add cycle sort algorithm

* feat: add cycle sort algorithm

* feat: add cycle sort algorithm

* updating DIRECTORY.md

* Add namespace decription

* fix: add assert and template

* fix: add some comment

* fix: update some suggested changes

* fix: update some suggested changes

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-21 11:07:53 -04:00
David Leal
2c13a7a376
[fix/docs]: Improve backtracking/n_queens_all_solution_optimised.cpp (#1041)
* updating DIRECTORY.md

* [fix/docs]: Improve backtracking/n_queens_...

...all_solution_optimised.cpp

* fix: Remove function-like macros

* clang-format and clang-tidy fixes for 689b788c

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-19 14:59:20 -05:00
divyansh12323
5731bcd6fc
feat: Add Pancake Sort algorithm (#1189)
* Create pancake_sort.cpp

* Update pancake_sort.cpp

* Update pancake_sort.cpp

* Update pancake_sort.cpp

* Update pancake_sort.cpp

* Update pancake_sort.cpp

* Update pancake_sort.cpp

* Update pancake_sort.cpp

* Update pancake_sort.cpp

* updating DIRECTORY.md

* Update pancake_sort.cpp

* Update pancake_sort.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-16 15:06:21 -05:00
Mertcan Davulcu
8e14b25fa3
Added strand sort algorithm (#1081)
* Create strand_sort.cpp

* Update strand_sort.cpp

* Update strand_sort.cpp

* Delete strand_sort.cpp

* Create strand_sort.cpp

* Update sorting/strand_sort.cpp

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

* Update strand_sort.cpp

* Update strand_sort.cpp

* Update sorting/strand_sort.cpp

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

* Update sorting/strand_sort.cpp

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

* Update strand_sort.cpp

* Update sorting/strand_sort.cpp

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

* Update sorting/strand_sort.cpp

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

* Update sorting/strand_sort.cpp

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

* Update sorting/strand_sort.cpp

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* Update sorting/strand_sort.cpp

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* Update sorting/strand_sort.cpp

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* Update strand_sort.cpp

* Update strand_sort.cpp

* updating DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-30 12:21:25 -05:00
@8848hg
67be3a592d
fix: short a bit the code (sorting/merge_sort.cpp) (#1066)
* Merge_sort modified in while loop

* Merge_sort modified in while loop

* Merge_sort modified in while loop

* Update merge_sort.cpp
2020-09-27 15:53:47 -05:00
Rakshit Raj
88fe6911df
Update merge_sort.cpp (#1077)
On line 133 --- corrected the size argument so that the last element is not missed
2020-09-09 12:51:07 -04:00
Krishna Vedala
08c4a3f664
feat: Added merge-insertion sort from #246 (#1062)
* Create Merge-insertion sort.cpp

* fixed file path

* working code

* added documentation

* replace c-style array with std::array

* updating DIRECTORY.md

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

Co-authored-by: sinkyoungdeok <tlsrudejr123@nate.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-03 08:51:30 -04:00
Lownish Rai Sookha
66dcc4c394
feat: add Pigeonhole algorithm (#1028)
* feat: add Pigeonhole algorithm

* Executed clang-format

* Used pointers and vector

* Corrected clang-tidy issues

* Modified code structure

* Apply suggestions from code review

Suggested changes applied

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

* Added missing parameter and documentation

* Added delete function

* Update pigeonhole_sort.cpp

* Corrected delete function

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Changed documentation regarding array size

* clang-tidy

* Apply suggestions from code review

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

* assert moved to test function

* Update pigeonhole_sort.cpp

* Update sorting/pigeonhole_sort.cpp

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

* Added test function and inbuilt min function

* min and max to const variables

* const int* to auto

* const int* to auto

* Apply suggestions from code review

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* Modified pigeonSort documentation

* Corrected test functions

Co-authored-by: lsurface <lownish@hotmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-08-25 18:57:24 -05:00
Krishna Vedala
8d68e61edf
[feature] new implementation of Quick sort (#958)
* added quick_sort_3

* Corrected some formatting error

* made more C-plus-plusy

* add test cases

* updating DIRECTORY.md

* clang-tidy fixes for 30c9a199ad

* better selef-tests + use std::vector

* use size_t

* change size_t to int32_t

Co-authored-by: mohit <rj7555555@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-20 21:12:31 -04:00
Deep Raval
ef1bf8849e
Fixed an issue related to doc (doxygen) (#960) 2020-07-19 14:42:01 -04:00
Krishna Vedala
67ec2aa982
[feature] Gnome sort (#956)
* implement gnome sort algorithm

* change name as in contribute.md

* remove std and fixed style  on clang-format

* Delete GnomeSort.cpp

* style changes

* add documentation

* T template

* style changes

* style changes

* repeated error fix

* cout fixed

* fix gnome_sort

* add assertions'

* added random values test

* updating DIRECTORY.md

* clang-tidy fixes for 97161cf894

* fix initial index value

* add braces to one line for-loops

* fix function documentation

Co-authored-by: beqakd <bgoga16@freeuni.edu.ge>
Co-authored-by: beqakd <39763019+beqakd@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-18 17:16:45 -04:00
Deep Raval
cac5fbe4aa
feat: add Bogo Sort (#952)
* Added Bogo Sort

* Changed code according to guidelines

* Added Comments and example

* Improved code quality

* Added range based loop and included cassert

* Changed Vectors to Array

* Added const to vector arg and now returning sorted array

* Changed vector to array and changed description format

* Added namespace sorting, Function description and tests

* Update sorting/Bogo_Sort.cpp

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* Replaced Shuffle with std::random_shuffle

* Renamed filename to smallercase, Added shuffle for ref and updated bracket styling

* Added missing ')'

* updating DIRECTORY.md

* Added spaces in single line comments

* Added Spaces

* Update sorting/bogo_sort.cpp

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

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2020-07-17 18:27:40 -04:00
Krishna Vedala
390ee8428e
fix to upper case 2020-07-01 13:08:41 -04:00
Krishna Vedala
4045bcddf3
verb correction 2020-07-01 13:05:52 -04:00
Krishna Vedala
84fd1cb0d0
small case 'e'
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2020-07-01 13:04:54 -04:00
Krishna Vedala
fed7dd1c13
improved self-tests 2020-07-01 12:37:54 -04:00
Krishna Vedala
69b5c8395a
better rendering of example steps 2020-07-01 10:36:08 -04:00
Krishna Vedala
9b799c93cb
added documentation for new function 2020-07-01 10:19:18 -04:00
Krishna Vedala
957b57cf60
fix issues from #929 2020-07-01 10:10:51 -04:00
github-actions
e4c62d28fe formatting source-code for 7af31e32a2 2020-07-01 10:10:51 +00:00
Ayaan Khan
7af31e32a2 Fix for loop formatiing 2020-07-01 15:39:53 +05:30
Ayaan Khan
dd0a07f18a loop formating fix 2020-07-01 15:38:55 +05:30
github-actions
3e1edca024 formatting source-code for efcccd0148 2020-06-30 22:35:45 +00:00
Ayaan Khan
efcccd0148 resolved merge conflict 2020-07-01 04:04:49 +05:30
Ayaan Khan
8179fbfdec test cases added 2020-07-01 04:03:13 +05:30
github-actions
d64f17f94c formatting source-code for 9217b4d8a8 2020-06-30 22:26:08 +00:00
Ayaan Khan
9217b4d8a8 Merge branch 'master' of https://github.com/ayaankhan98/C-Plus-Plus 2020-07-01 03:54:33 +05:30
Ayaan Khan
d3324aaf34 Fix: code quality and Docs 2020-07-01 03:54:01 +05:30
Ayaan Khan
3fc85322c1
Merge pull request #899 from ayaankhan98/master
fix: minor docs issue
2020-06-25 04:13:29 +05:30