Commit Graph

1254 Commits

Author SHA1 Message Date
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
github-actions
508ea020d3 updating DIRECTORY.md 2020-09-04 00:14:24 +00:00
ckontakis
60050d7b1b
Added Horspool algorithm (#1071)
* feat: add Horspool algorithm

* Fixed conversion from unsigned long to int with static casting

* Removed changes from CMakeLists.txt file

* Update strings/horspool.cpp

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

* Update strings/horspool.cpp

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

* Documentation, test function and namespaces added

* Documentation, test function and namespaces added

* Update strings/horspool.cpp

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

* Update strings/horspool.cpp

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

* Update strings/horspool.cpp

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

* Update strings/horspool.cpp

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

* Update strings/horspool.cpp

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

* Update strings/horspool.cpp

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

* Removed blank rows

* Commit to see if the problem with automated tests is solved

Co-authored-by: David Leal <halfpacho@gmail.com>
2020-09-03 20:12:56 -04:00
Bolaji Boluwatife
6e77f98494
Revised Linked List (#999)
* Addition of Test to LinkedList

I noticed an infinite loop when the program asks the user to "Enter the element to be inserted:", and the user enters a wrong input such as "rr".

* Revised Tests

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update data_structures/linked_list.cpp

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

* Update data_structures/linked_list.cpp

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

* Update data_structures/linked_list.cpp

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

* Update data_structures/linked_list.cpp

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

* Update data_structures/linked_list.cpp

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

* Update data_structures/linked_list.cpp

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

* Update data_structures/linked_list.cpp

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

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update data_structures/linked_list.cpp

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

* added documentations to functions

I made a few changes although I'm not sure I covered all.

* Update linked_list.cpp

* function documentation

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

* function documentation

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

* function documentation

* Update linked_list.cpp

* removed global variable

I decided to go with the parameter approach.
Is line 79(Iter& ....) and others like it considered healthy code?

* removed global variable

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* fixed clang errors

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* program rewrite

* Update linked_list.cpp

* Update linked_list.cpp

* Removed extra space

* Update linked_list.cpp

* Delete vdoubly_linked_list.ico

* added documentation

* added documentation

* added documentation

* use of shared_ptr

* use of shared_ptr

* modified linked list

* Update linked_list.cpp

* added string header

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* fixed documentation

* fixed link class

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* Update linked_list.cpp

* fixed link class

* fixed runtime error

Co-authored-by: David Leal <halfpacho@gmail.com>
2020-09-03 19:01:50 -05: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
github-actions
a9da541127 updating DIRECTORY.md 2020-08-31 18:56:34 +00:00
Nimish Shah
0fcdbf2bdc
fix: Remove repeated algorithm (#1067)
* Improve code and add support for 46+ fibb numbers

* Docs: Fibbonacci docs added

* fix: Add c++ suggested code

* fix: remove repeated algorithm
2020-08-31 13:55:49 -05:00
Filip Hlasek
072fc95228
docs: Update clang-format instructions in CONTRIBUTING. (#1053)
* docs: Update clang-format instructions in CONTRIBUTING.

* Accomodate more changes in the PR section of CONTRIBUTING.

* code formatting

* code sample as a shell script

* format build command

* Add instructions for clang-format installation.

* gitpod

* remove a sentence.
2020-08-30 13:38:49 -04:00
Filip Hlasek
4ed75018e3
fix: Clean up of code examples in CONTRIBUTING to follow guidelines. (#1063) 2020-08-28 12:47:02 -04:00
Krishna Vedala
f4fe0c6f5b
[fix] rename data_structures namespace (#1061)
* rename data_structures namespace

* spelling correction

* fix namespace doc name
2020-08-27 17:13:27 -04:00
Krishna Vedala
b4bbe9dc4e
[code fix] Fixed trie_tree for code quality and docs & clang-tidy error check (#1059)
* attempt to fix trie-tree code

* clang-tidy fixes

* remove performance-unnecessary-value-param as error - this has auto-fix

* make test() static

* added original author to the description

* added namespace

* doc updates

* fix true spelling

* extended to small & big caps alphabets - 52 characters

* clang-format and clang-tidy fixes for edc2247a

* move const parameter to after the parameters

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-27 12:30:14 -04:00
Raman Preet Singh
f255e3f1fa
docs: Fix spelling typo (#1058) 2020-08-27 09:33:10 -05:00
Filip Hlasek
ea3071d52a
fix: clang-format for hamiltons_cycle. (#1054) 2020-08-27 09:31:34 -05:00
Filip Hlasek
eee5f9495d
fix: clang-format for dijkstra (#1055) 2020-08-27 09:29:22 -05:00
Filip Hlasek
79fb528dad
fix: clang-format for graph/ (#1056)
* fix: clang-format for graph/

* remove graph.h
2020-08-27 09:28:31 -05:00
Filip Hlasek
3239fcc19e
fix: linter and spacing for is_graph_bipartite. (#1037)
* fix: linter and spacing for is_graph_bipartite.

* updating DIRECTORY.md

* clang-tidy fixes for a49ec9b8d7

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

* Address reviewer's comments.

* Fix docs wording.

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-27 09:26:49 -05:00
David Leal
f0c218c789
[fix/docs]: Improve backtracking/nqueen_print_all_solutions.cpp (#1049)
* updating DIRECTORY.md

* updating DIRECTORY.md

* [fix/docs]: Improve backtracking/nqueen_print_all_solutions.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-26 12:57:21 -05:00
Deep Raval
44f4f4d6c3
fix: error handling in opening of external files (neural_network.cpp). (#1044)
* Error Handdling of Files

* exit -> std::exit

* Improved Overall Error handling and reporting

* test commit 

added spaces in include to try to trigger GitHub Actions

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 51e943d0

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-26 12:56:31 -05:00
Krishna Vedala
c4f586b6ab
[bug fix] fix code formatting in CI (#1052)
* fix: linter and spacing for is_graph_bipartite.

* updating DIRECTORY.md

* clang-tidy fixes for a49ec9b8d7

* use clang-12

* downgrade to clang11

* added clang-format confiug file

* added explicit clang-format step in workflow

* fix git command

* commit format and lint together

lint first and then format

* corrected order

* Revert "Merge branch 'is_graph_bipartite' into fix_clang"

This reverts commit d4d4060175, reversing
changes made to 2ccc3a364e.

Co-authored-by: Filip Hlásek <fhlasek@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-26 10:48:08 -04:00
github-actions
63333f38cc updating DIRECTORY.md 2020-08-25 23:58:06 +00: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
Filip Hlasek
2882b7bec2
fix: math/fibonacci linter warnings. (#1047)
* fix: math/fibonacci linter warnings.

* updating DIRECTORY.md

* doxygen

* unit64_t instead of unsigned int

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-25 18:56:49 -05:00
Krishna Vedala
de868c9faa
[enhancement] guideline for multiple implementations (#1051)
* guideline for multiple implementations

* updating DIRECTORY.md

* fixed spelling

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-25 19:20:32 -04:00
github-actions
149fe0cd63 updating DIRECTORY.md 2020-08-25 12:23:25 +00:00
Ayaan Khan
0dad6265f8
Merge pull request #1050 from verma-anushka/cpp
fix typo: (rename file) fast_interger_input -> fast_integer_input
2020-08-25 17:48:06 +05:30
Anushka Verma
47bbc2a16e remove word break 2020-08-24 01:54:17 +05:30
Anushka Verma
7a13a35dfd feat: add word break solution (backtracking) 2020-08-24 01:47:16 +05:30
Anushka Verma
039022becf fix typo: (rename file) fast_interger_input -> fast_integer_input 2020-08-24 01:19:39 +05:30
Ayaan Khan
f308a05a87
Merge pull request #1045 from Rp-sushil/rp
[BUG] #804 search/median_search.cpp FIXED
2020-08-23 16:57:06 +05:30
Sushil Kumar
b50591dfce
Suggested changes has been made. 2020-08-23 15:49:52 +05:30
Sushil Kumar
a1242904e1
repeated constraints removed. 2020-08-23 00:37:46 +05:30
Sushil Kumar
37b252697d
test added 2020-08-23 00:29:00 +05:30
Sushil Kumar
306de24e70
Suggested changes has been made. 2020-08-22 02:39:13 +05:30
Sushil Kumar
498db114f3
updated median_search (#962 as reference) 2020-08-22 02:22:47 +05:30
Sushil Kumar
caed3ddadd
Changed has been made (#962 as a reference) 2020-08-22 01:53:54 +05:30
Sushil Kumar
b631eee388
added a comment block like in #962. 2020-08-21 23:47:07 +05:30
Sushil Kumar
406ad387db
Suggested changes has been made. 2020-08-21 12:08:06 +05:30
Sushil Kumar
0d61b0494f
fixed clang-tidy warnings 2020-08-21 10:45:00 +05:30
Rp-sushil
1433ef2210 [BUG] #804 search/median_search.cpp FIXED 2020-08-20 17:21:30 +05:30
Aniruthan R
416a3bc169
Added heavy_light_decomposition.cpp (#1016)
* Added heavy_light_decomposition.cpp

* Update range_queries/heavy_light_decomposition.cpp

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

* Update range_queries/heavy_light_decomposition.cpp

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

* Update range_queries/heavy_light_decomposition.cpp

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

* Added function documentation

TODO: Data member documentation.

* Update heavy_light_decomposition.cpp

* Update heavy_light_decomposition.cpp

* Corrected typos, and remove comma

* Corrected typos, and removed comma

* Edited comments

* Update range_queries/heavy_light_decomposition.cpp

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

* Added wiki

* Create c-cpp.yml

* updating DIRECTORY.md

* Delete c-cpp.yml

* Added namespace, Removed quoted @params

* updating DIRECTORY.md

* clang-tidy fixes for 25f16d7483

* Update heavy_light_decomposition.cpp

* Update heavy_light_decomposition.cpp

* Apply suggestions from code review

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

* Edited Comments

* clang-tidy fixes for 07b46bbd9d

* Apply suggestions from code review

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

* Fixed markdown

* Apply suggestions from code review

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

* Edited comments

* Update heavy_light_decomposition.cpp

* Update heavy_light_decomposition.cpp

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Added data member documentation

* Formatted Code

* Edited data member comments

* Update range_queries/heavy_light_decomposition.cpp

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

* Update heavy_light_decomposition.cpp

* Added testcase verification

* Update heavy_light_decomposition.cpp

* Added a new test case

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-08-19 14:40:46 -05:00
Deep Raval
4a34bec125
feat: Add Neural Network (Multilayer Perceptron) (#1025)
* Completed NN

* Made changes

* Added return in identity function

* Added <random> and fixed namespace naming

* clang-tidy changes

* Update machine_learning/neural_network.cpp

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

* Update machine_learning/neural_network.cpp

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

* Update machine_learning/neural_network.cpp

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

* Update machine_learning/vector_ops.hpp

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

* Update machine_learning/vector_ops.hpp

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

* Update machine_learning/neural_network.cpp

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

* Update machine_learning/neural_network.cpp

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

* added std::cerr and changed argmax's namespace

* Done suggested changes

* Fixed a comment

* clang-tidy fixes

Co-authored-by: David Leal <halfpacho@gmail.com>
2020-08-19 15:25:32 -04:00
Ayaan Khan
dfe5bd7638
Merge pull request #986 from fhlasek/fixgraph
fhlasek/fixgraph: refactor of graph/ to follow the linter style
2020-08-19 10:30:16 +05:30
Filip Hlásek
c1a2e33f2f Adjust comment. 2020-08-17 20:10:03 -07:00
ridhishjain
3741b41a8a
feat: add shortest common super-sequence algorithm (#1030)
* main cpp file for shortest common supersequence

* fixing reverse function bug

* converting c style array to std::vector

* removing namespace directives

* adding documentation and test cases

* namespace declarations

* update shortest_common_supersequence.cpp

* update shortest_common_supersequence.cpp

* Update dynamic_programming/shortest_common_supersequence.cpp

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

* Update dynamic_programming/shortest_common_supersequence.cpp

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

* Update dynamic_programming/shortest_common_supersequence.cpp

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

* update shortest_common_supersequence.cpp

* update shortest_common_supersequence.cpp

* update shortest_common_supersequence.cpp

* Update dynamic_programming/shortest_common_supersequence.cpp

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

* 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-08-17 09:38:14 -04:00
github-actions
9927b46205 updating DIRECTORY.md 2020-08-17 06:36:56 +00:00
Filip Hlásek
befec35474 Merge branch 'master' into fixgraph 2020-08-16 23:36:05 -07:00
Filip Hlásek
990e578abe Merge remote-tracking branch 'upstream/master' 2020-08-16 23:34:55 -07:00
Filip Hlasek
36f1d3327b
fix: linter for kosaraju (#1035)
* fix: linter for kosaraju

* update doxygen parameters
2020-08-16 23:43:33 -05:00
Filip Hlasek
91ce393c45
fix: linter for kruskal (#1036)
* fix: linter for kruskal

* using instead of typedef.
2020-08-17 00:23:29 -04:00
David Leal
d8b4da68bf
Merge pull request #1027 from rishabh-997/jarvis
Added Jarvis Algorithm to compute convex hull
2020-08-16 19:14:03 -05:00