Commit Graph

1649 Commits

Author SHA1 Message Date
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
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
Nitin Sharma
446e0a5ce8
feat: add lru caching algorithm (#1557)
* updating DIRECTORY.md

* feat: add lru caching algorithm

* removing clang tidy warnings

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for fcb50fb7

* docs updated

* clang-format and clang-tidy fixes for ee18e3aa

* using list instead of bits/stdc++.h

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

* Update others/lru_cache.cpp

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

* Update others/lru_cache.cpp

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

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

* Update others/lru_cache.cpp

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

* Update others/lru_cache.cpp

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

* Update others/lru_cache.cpp

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

* Update others/lru_cache.cpp

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

* Update others/lru_cache.cpp

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

* Update others/lru_cache.cpp

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

* Update others/lru_cache.cpp

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

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

* using uint for non negative numbers

* clang-format and clang-tidy fixes for 87e7df55

* Update others/lru_cache.cpp

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

* clang-format and clang-tidy fixes for b423fd4b

* suggestions applied

* clang-format and clang-tidy fixes for e3ba29eb

* Update others/lru_cache.cpp

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

* clang-format and clang-tidy fixes for bdeee3da

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-08-17 12:25:08 -05:00
ss1208
5dca8bc615
fix: Minor spelling fixes in README.md (#1560)
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-08-16 11:44:39 -05:00
Piyush Kumar
d088e290d4
feat: Add endlines in hashing/chaining.cpp (#1559)
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-08-15 11:23:18 -05:00
Swastika Gupta
20f74d4138
feat: Karatsuba algorithm (#1550)
* karatsuba algorithm

* Update karatsuba_algorithm_for_fast_multiplication.cpp

* Update karatsuba_algorithm_for_fast_multiplication.cpp

* Update karatsuba_algorithm_for_fast_multiplication.cpp

* Update karatsuba_algorithm_for_fast_multiplication.cpp

* Update karatsuba_algorithm_for_fast_multiplication.cpp

* Update karatsuba_algorithm_for_fast_multiplication.cpp

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 180f356d

* Update divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp

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

* Update divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp

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

* Update divide_and_conquer/karatsuba_algorithm_for_fast_multiplication.cpp

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

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

* 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: Ayaan Khan <ayaankhan98@gmail.com>
2021-08-09 18:30:42 +05:30
Swastika Gupta
faa58ed190
feat: Wildcard matching problem (#1552)
* wildcard matching

* Update backtracking/wildcard_matching.cpp

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

* Update backtracking/wildcard_matching.cpp

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

* Update backtracking/wildcard_matching.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for b2e0dbe0

* Update wildcard_matching.cpp

* clang-format and clang-tidy fixes for cae3a923

* Update backtracking/wildcard_matching.cpp

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

* clang-format and clang-tidy fixes for 82338785

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-08-07 19:29:46 -05:00
Swastika Gupta
a764d57e96
feat: Add n_bonacci.cpp in math section (#1544)
* n-bonacci

* Update math/n_bonacci.cpp

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

* Update math/n_bonacci.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for f30cb377

* Update math/n_bonacci.cpp

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

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

* Update n_bonacci.cpp

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-07-29 12:29:27 -05:00
Swastika Gupta
bd44418731
feat: Add count_of_trailing_ciphers_in_factorial_n (#1543)
* zeroes

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 537cd7e8

* Update count_of_trailing_ciphers_in_factorial_n.cpp

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* Update bit_manipulation/count_of_trailing_ciphers_in_factorial_n.cpp

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

* clang-format and clang-tidy fixes for a8c85e2d

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-07-29 11:41:52 -05:00
Panquesito7
a6bd936530 test 2021-07-25 19:06:58 +00:00
codingbbq
f9a1acd4c3
Issue #1536 - [BUG] check_prime.cpp returns incorrect output for 9 (#1537)
Co-authored-by: Idrish Laxmidhar <idrish.l@hcl.com>
Co-authored-by: Vishal Sharma <mrvishalsharma@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-22 13:08:28 -05:00
David Leal
5d34de836e
feat: Convert all issue templates into issue forms (#1545)
* feat: Convert all issue templates into issue...

...forms. Also disables blank issues and adds an `Other` template for generic issues but no blank issues.

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-07-22 22:10:10 +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
0e0ba5fc89
feat: Add the floyd_cycle_detection_algo.cpp file/algorithm (#1540)
* search for duplicate number using Floyd algorithm

* Update floyd_cycle_detection_algo.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-21 14:10:17 -05:00
Nitin Sharma
652c2d2650
feat: add inorder successor for bst in operations on ds (#1532)
* feat: add inorder successor in bst

* clang-tidy errors fixed, reference docs link added

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for f8658fe5

* docs formatting changed, namespace added

* clang-format and clang-tidy fixes for f54f31cd

* added bullet points in docs

* Update operations_on_datastructures/inorder_successor_of_bst.cpp

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

* Update operations_on_datastructures/inorder_successor_of_bst.cpp

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

* Update operations_on_datastructures/inorder_successor_of_bst.cpp

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

* Update operations_on_datastructures/inorder_successor_of_bst.cpp

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

* docs improved

* clang-format and clang-tidy fixes for f1b83198

* Update operations_on_datastructures/inorder_successor_of_bst.cpp

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

* clang-format and clang-tidy fixes for 420a4ec1

* Apply suggestions from code review

* fix: Apply suggestions from code review

* memory leaks patched

* clang-format and clang-tidy fixes for ac801a1e

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-18 00:02:08 -05:00
Jxtopher
ae8685fb6a
feat: solving magic sequence problem with backtracking (#1533)
* Create magic_sequence.cpp

* update code formatter

* updating DIRECTORY.md

* Update magic_sequence.cpp

* Delete settings.json

* Update backtracking/magic_sequence.cpp

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

* Update magic_sequence.cpp

* Revert "Delete settings.json"

This reverts commit 64b08dee6d.

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* clang-format and clang-tidy fixes for 2263f033

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update magic_sequence.cpp

* Update magic_sequence.cpp

* Update magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update magic_sequence.cpp

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* Update backtracking/magic_sequence.cpp

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

* clang-format and clang-tidy fixes for f889fb4f

* Update backtracking/magic_sequence.cpp

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

* Update magic_sequence.cpp

* fix: 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-17 15:36:19 +05:30
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
e059765f79
Create subset_sum.cpp (#1517)
* Create subset_sum.cpp

* Update subset_sum.cpp

* Update subset_sum.cpp

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 4827805a

* Update subset_sum.cpp

* clang-format and clang-tidy fixes for dac32465

* Update backtracking/subset_sum.cpp

Co-authored-by: Filip Hlasek <fhlasek@gmail.com>

* Update backtracking/subset_sum.cpp

Co-authored-by: Filip Hlasek <fhlasek@gmail.com>

* clang-format and clang-tidy fixes for 1328571c

* Update backtracking/subset_sum.cpp

Co-authored-by: Filip Hlasek <fhlasek@gmail.com>

* Update subset_sum.cpp

* clang-format and clang-tidy fixes for 2325e165

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update backtracking/subset_sum.cpp

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

* Update subset_sum.cpp

* Update subset_sum.cpp

* clang-format and clang-tidy fixes for 2405a142

* Update subset_sum.cpp

* clang-format and clang-tidy fixes for 383baeb3

* Update subset_sum.cpp

* Update backtracking/subset_sum.cpp

* Update backtracking/subset_sum.cpp

* Update backtracking/subset_sum.cpp

* Update backtracking/subset_sum.cpp

* Update backtracking/subset_sum.cpp

* Update backtracking/subset_sum.cpp

* Update backtracking/subset_sum.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Filip Hlasek <fhlasek@gmail.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-12 20:19:03 -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
Abhinn Mishra
394811e601
fix: spelling error in CONTRIBUTING.md (#1531)
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-09 14:03:57 -05:00
Swastika Gupta
6115bc2981
feat: Add House Robber algorithm (#1524)
* Create house_robber.cpp

* updating DIRECTORY.md

* Update dynamic_programming/house_robber.cpp

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

* Update dynamic_programming/house_robber.cpp

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

* Update dynamic_programming/house_robber.cpp

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

* clang-format and clang-tidy fixes for c00823e8

* Update house_robber.cpp

* clang-format and clang-tidy fixes for cdf701c2

* Update house_robber.cpp

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

* Update dynamic_programming/house_robber.cpp

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

* clang-format and clang-tidy fixes for 126e3f21

* Update house_robber.cpp

* Update dynamic_programming/house_robber.cpp

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

* Update dynamic_programming/house_robber.cpp

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

* Update dynamic_programming/house_robber.cpp

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

* Update dynamic_programming/house_robber.cpp

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

* Update house_robber.cpp

* clang-format and clang-tidy fixes for 474a5f0b

* Update dynamic_programming/house_robber.cpp

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

* Update dynamic_programming/house_robber.cpp

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

* clang-format and clang-tidy fixes for 203cce31

* Update house_robber.cpp

* Update house_robber.cpp

* Update house_robber.cpp

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

* Apply suggestions from code review

* Apply suggestions from code review

* clang-format and clang-tidy fixes for 913baf88

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-07-09 14:02:28 -05:00
Jxtopher
1ab5e4e564
feat: Replace "\n" -> std::endl (#1530)
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-07-09 14:00:34 -05:00
Swastika Gupta
34556ad939
Create count_of_set_bits.cpp (#1515)
* Create count_of_set_bits.cpp

* Update count_of_set_bits.cpp

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for d0dc7eb3

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

* clang-format and clang-tidy fixes for f8606e8f

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

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

* Update count_of_set_bits.cpp

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.cpp

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

* Update bit_manipulation/count_of_set_bits.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>
2021-07-09 15:13:57 +05:30
Nitin Sharma
97afa0e3e4
feat: add Sublist Search Algorithm (#1513)
* feat: add sublist search algorithm

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for e59bc3bf

* Update search/sublist_search.cpp header docs

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

* Update search/sublist_search.cpp docs

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

* Update docs search/sublist_search.cpp

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

* Update docs search/sublist_search.cpp

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

* Update minor docs in  search/sublist_search.cpp

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

* made test function non static

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

* test docs updated

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

* namespaces added for search algo, docs added for test cases

* [feat/fix/docs]: Perform some necessary changes

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

* test cases docs added, merge fixed

* clang-format and clang-tidy fixes for be0160b4

* one liner docs added

* clang-format and clang-tidy fixes for 95b362f3

* some final docs fixes

* clang-format and clang-tidy fixes for 798972e9

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* docs updated for one line docs

* clang-format and clang-tidy fixes for aebae1df

* added one liner docs

* clang-format and clang-tidy fixes for f6913b75

* Update search/sublist_search.cpp

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

* Update search/sublist_search.cpp

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

* clang-format and clang-tidy fixes for 66d1b87f

* Update search/sublist_search.cpp

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

* Update search/sublist_search.cpp

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

* Apply suggestions from code review

* clang-format and clang-tidy fixes for dc5b0c6c

* Apply suggestions from code review

* clang-format and clang-tidy fixes for 6436932f

* Apply suggestions from code review

* clang-format and clang-tidy fixes for 35f39b57

* Update docs search/sublist_search.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>
2021-07-07 14:53:29 +05:30
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
David Leal
0c5c096991
[feat/fix]: Improve the contributing guidelines... (#1522)
...and add the `CodingGuidelines.md` file, taken and edited from the [C](https://github.com/TheAlgorithms/C) repository.
2021-07-05 22:02:33 -05:00
Motasim
47c84137ee
feat: Added implementation of iterative version of tree traversals. (#1506)
* feat: Added iterative version of tree traversals.

Here is the implementation of the iterative version of the Preorder, Postorder, and the Inorder traversal of given tree.
.
Time Complexity: O(n), where 'n' is the total number of nodes in a tree.

* updating DIRECTORY.md

* fixed: function descriptions, namespace declaration, and included separate libraries.

* fixed: added range bases for loops.

* style: proper indentation

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

* style: proper indentation

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

* style: proper indentation

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

* fix: C style NULL to nullptr

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

* docs: spell correction

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

* style: formatted comments.

* fixes: static_cast, if and for statement braces

* style: modified pointer declaration.

* fixes: removed use of typedef, renamed BT to Node

* Fix `clang-tidy` warnings

* fix: Try to fix `clang-tidy` warnings this time

* docs: Proper function description

Co-authored-by: Mann Patel <46739555+manncodes@users.noreply.github.com>

* fix: Class based approach

* docs: Proper formatted comment

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

* docs: Proper indentation

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

* fix: Initialized data variable

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

* docs: Proper formatted comment

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

* docs: Proper indentation

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

* docs: Proper formatted comment

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

* docs: Proper function description

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

* docs: Removed unnecessary comment

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

* docs: Proper formatted comment

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

* docs: Proper function description

* docs: Proper variables description

Co-authored-by: Mann Patel <46739555+manncodes@users.noreply.github.com>

* docs: Included variables description

Co-authored-by: Mann Patel <46739555+manncodes@users.noreply.github.com>

* docs: Included variables description

Co-authored-by: Mann Patel <46739555+manncodes@users.noreply.github.com>

* docs: Proper variables description

Co-authored-by: Mann Patel <46739555+manncodes@users.noreply.github.com>

* fixes: Self-test implementation and namespace

* docs: Documentation improvements

* docs: Proper formatted description

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

* docs: Proper formatted description

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

* docs: Proper formatted description

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

* docs: Proper formatted description

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

* docs: Proper indentation

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

* docs: Proper formatted description

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

* docs: Improved function description

* docs: Proper formatted description

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

* test: Added test cases for negative values

* docs: Proper description

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

* docs: Proper formatted comment

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

* docs: Proper formatted comment

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

* docs: Proper function description

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

* docs: Proper formatted description

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

* docs: Proper description

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

* docs: Proper description

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: Mann Patel <46739555+manncodes@users.noreply.github.com>
2021-07-05 19:32:41 -05:00
David Leal
d54afc520f
[feat/fix]: Improve the contributing guidelines (#1503)
* [feat/fix]: Improve the contributing guidelines

Mostly fix grammar, spelling errors, typos, and improves wording.

* [docs]: Apply suggestions from code review

* [feat/fix]: Minor improvements/fixes

Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2021-06-18 14:55:52 -05:00
David Leal
554919d9f5
[feat/fix/docs]: Improve the dynamic_programming/longest_increasing_subsequence.cpp file (#1504)
* [feat/fix/docs]: Improve the `dynamic_programming/longest_increasing_subsequence.cpp` file

* [test/feat]: Add self-test implementations and...

...namespace (`dynamic_programming`).
Thanks to @manncodes for the idea and help!

Co-authored-by: Mann Patel <manncodes@users.noreply.github.com>

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

Co-authored-by: Mann Patel <manncodes@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-06-18 14:17:31 -05:00
Mann Patel
17405a05ee
feat: add spare table data structure (#1502)
* feat: add spare table data structure

Added implementation of sparse table for a 'duplicate invariant function'. Implementation of min(a1,a2...,aN) being the duplicate invariant function is done.

* fixed: clang-tidy warnings

* minor change: remove bits/stdc++ header

* added header comments

* updating DIRECTORY.md

* fixed to clang-format

* fixed header postion

suggested change

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

* fixed author name

suggested changes

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

* fixed test() info to Doxygen standards.

suggested changes

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

* changed comment

suggested changes

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

* minor changes in file info

suggested changes

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

* minor changes in file info

suggested changes

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

* minor changes in file info

suggested changes

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

* changes in variable and struct descriptions

* Update data_structures/sparse_table.cpp

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

* Update data_structures/sparse_table.cpp

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

* Update data_structures/sparse_table.cpp

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

* changed int data type for non-negative numbers

* changing datatypes of certain variables

* Update data_structures/sparse_table.cpp

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

* Update data_structures/sparse_table.cpp

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

* clang-format and clang-tidy fixes for ddf777fc

* minor changes

* fixed comparison of integer of diff signedness

* Update data_structures/sparse_table.cpp

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

* added description as @Panquesito7 suggested

* minor grammar checks

* minor documentation fixes

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-06-07 15:24:49 -05:00