Commit Graph

196 Commits

Author SHA1 Message Date
Ashish Bhanu Daulatabad
0a596dd7aa
feat: Base64 Encoding/Decoding, type: Ciphers (#1471)
* updating DIRECTORY.md

* Feat: Base64 Encoding Decoding, Type: cipher

* Feat: Base64 Encoding Decoding, Type: cipher-2

* Type checks

* updating DIRECTORY.md

* Wrong param explaination

* Namespace and comments

* Update ciphers/base64_encoding.cpp

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

* Update ciphers/base64_encoding.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-03-31 10:46:54 +05:30
Ashish Bhanu Daulatabad
8f72965be4
Feat: A Star Search, Type: AI/ML (#1468)
* updating DIRECTORY.md

* Feat: A* Search Algorithm, Type: AI/ML

* Type changes

* Code reformatting.

* Code reformatting-2

* Code refactoring-3.

* Code refactoring-3.

* Code refactoring-4.

* Code refactoring-4.

* Code refactoring-5.

* updating DIRECTORY.md

* Minor changes

* clang-format and clang-tidy fixes for edf593f7

* Minor changes-2

* Enhanced AyStarSearch class documentation.

* Adding Closed List for faster A* search.

* Type checks

* Type checks-2

* Comments

* Update machine_learning/a_star_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-03-25 22:00:03 +05:30
Venkata Bharath Malapati
7ea1ca6c9c
feat: Trie data structure using hashmap, predict_words method, class Trie (#1464)
* feat: add Trie data structure using hashmap, predict_words method, class Trie

* updating DIRECTORY.md

* fix: fixed clang.tidy warnings

* docs: added documentation toclass trie

* docs: updated documentation

* fix: added namespace trie_using_hashmap

* docs: updated documentation with comments

* docs: updated documentation with spelling corrections

* docs: updated requested changes

* docs : updated requested changes in documentation

* 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-03-18 23:58:33 +05:30
Ashish Bhanu Daulatabad
73ff948b0d
feat: Solving linear recurrence using Matrix Exponentiation (with examples). (#1463)
* updating DIRECTORY.md

* feat: Solving Linear Recurrence using Matrix Exponentiation

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 83efb534

* Directory.md

* updating DIRECTORY.md

* Comment Modification

* Comments

* Missing namespace

* Missing namespace

* Type checking

* reduced mod size due to integer overflow, changed int32 to int64

* Adding template parameters and missing markdowns.

* Markdown and minor code changes

* Minor changes

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-03-17 23:57:51 +05:30
Ashish Bhanu Daulatabad
a2970af4c4
feat: add abbreviation.cpp: topic: Dynamic Programming (#1461)
* Feat: Abbreivation problem (abbreviation.cpp), topic: Dynamic Programming.

* Spelling correction

* Spelling Mistakes

* Refactoring code

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 232d4f5e

* clang-format and clang-tidy fixes for 232d4f5e

* Documentation and renaming variable

* adding a comment

* adding a comment

* Re-documentation

* Re-documentation

* Re-documentation

* Update dynamic_programming/abbreviation.cpp

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

* Update dynamic_programming/abbreviation.cpp

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

* Update dynamic_programming/abbreviation.cpp

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

* Varaible type-checks

* Update dynamic_programming/abbreviation.cpp

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

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

* Varaible type-checks

* Markdown correction

* Comment Modification

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-03-12 00:33:15 +05:30
g-s-k-zoro
ef0e7ff87c
feat: Multiple Variants of Search on Trie (#1456)
* Trie with 3 types of search

* Trie with 3 types of search and all basic operations

* updating DIRECTORY.md

* docs: added Main function documentation

* test: Added test for operations and improved documentation

* docs: Code formatted to conform more with clang

* docs: Code formatted to conform more with clang

* docs: Code formatted to conform more with clang format

* docs: Code formatted to conform more with clang format

* docs: Code format conforms to clang format

* docs: Suggested documentation changes implemented

* docs: added comments for headers

* docs: Added comments for headers

* fix: Add a new line at the end

* docs: Added newline at end and modified header comments

* docs: Added newline at end and modified header comments

* docs: Added newline at end and modified header comments

* docs: suggested comments implemented

* docs: Function documentation corrected

* fix: Used unsigned int for appropriate variables

* fix: Made test() static and improved documentation

* docs: Improved Documentation

* docs: Improved Readability

* fix: Use of std::count for numberOfChildren

* docs: improved documentation

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-02-24 14:03:25 +05:30
Max A. Jurankov
0b890fd842
feat: add program to calculate binomial coefficients (#1448)
* Add program to calculate binomial coefficients

* docs: add link to github profile, change cmath to cstdlib

* correction of comments, adding math namespace

* updating DIRECTORY.md

* Adding binomial namespace, rename function and filename, correcting comments

* updating DIRECTORY.md

Co-authored-by: astronmax <astronmax@yandex.ru>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-02-23 00:51:58 +05:30
Ravishankar Joshi
0ce5df0c21
feat: Hamming distance algorithm. (#1376)
* Added bit manipulation algorithms.

* Removed Power of 2 and xor swap.

* Update bit_manipulation/hamming_distance.cpp

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

* Update bit_manipulation/hamming_distance.cpp

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

* Update bit_manipulation/hamming_distance.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for ae4d4707

* Apply suggestions from code review

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

* test: docs: Added tests and docs for hamming distance.

* Apply suggestions from code review

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

* clang-format and clang-tidy fixes for 94fb407b

* Update bit_manipulation/hamming_distance.cpp

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

* feat: Added string method for hamming distance.

* Apply suggestions from code review

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

* clang-format and clang-tidy fixes for 455dce1d

* fix: Make hamming distance algorithm work for all strings.

* clang-format and clang-tidy fixes for ba18ec04

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-02-17 08:08:29 +05:30
Neha Hasija
9438ea11a2
Create power_of_two.cpp (#1315)
* Create power_of_two.cpp

This Pull Request is for HacktoberFest 2020

* Update math/power_of_two.cpp

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

* Update math/power_of_two.cpp

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

* Update math/power_of_two.cpp

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

* Update math/power_of_two.cpp

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

* Update math/power_of_two.cpp

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

* Update math/power_of_two.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 3d017c44

* Update math/power_of_two.cpp

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

* Update math/power_of_two.cpp

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

* Update math/power_of_two.cpp

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

* clang-format and clang-tidy fixes for f76c1009

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-02-12 10:14:01 +05:30
Magdy Sedra
b12dad038c
feat: Added persistent segment tree with lazy propagation (#1445)
* Added persistent segment tree with lazy propagation

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Added a documentation

* Updated

* updating DIRECTORY.md

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

* Updated

* clang-format and clang-tidy fixes for 6197ba4c

* Update persistent_segment_tree_with_lazy_propagation.cpp

* Updated

* Delete persistent_segment_tree_with_lazy_propagation.cpp

* Updated

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 81621d83

* Update persistent_seg_tree_lazy_prop.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2021-02-08 11:19:26 -06:00
Walt
6b4d6c20ff
feat: add new implementation of binary search tree (#1208)
* fix: revamp binary_search_tree.cpp to use generics, oop, and modern c++ features

* fix: remove make_unique from code

* fix: fix some clang-tidy errors in binary_search_tree.cpp

* Move new implementation into new file, restore old file.

* Reset binary_search_tree.cpp to original implementation.

* Add link to new implementation.

* fix: add suggested fixes (see PR)

* Implement comment suggestions.

* Update data_structures/binary_search_tree2.cpp

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

* Fix additional comments.

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2021-02-05 15:37:16 +05:30
github-actions
28b5b2b829 updating DIRECTORY.md 2021-02-05 09:46:52 +00:00
Shreyas Sable
f4423503a1
cross product of two vectors (#1292)
* cross product of two vectors

* cross product of two mathematical vectors (fixed)

* cross product of two mathematical vectors (fixed)

* updating DIRECTORY.md

* cross product of two mathematical vectors (fixed)

* cross product of two mathematical vectors (fixed)

* cross product of two mathematical vectors (fixed)

* cross product of two vectors (with tests)

* cross product of two mathematical vectors (fixed)

* cross product of two vectors (with example fixed)

* cross product of two vectors

* cross product of two mathematical vectors

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-02-05 15:13:45 +05:30
github-actions
39ba144bb1 updating DIRECTORY.md 2021-02-05 09:43:02 +00:00
github-actions
0e1e441ab3 updating DIRECTORY.md 2021-01-17 20:44:52 +00:00
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
Hashir Hameed Niazi
60c607becd
feat: Add Saddleback search (#1432)
* feat: add saddleback search algorithm

* docs: add comments and explaination for saddleback algorithm

* test: add test for saddleback algorithm

* refactor: use size_t instead of int

* refactor: made suggested changes

* updating DIRECTORY.md

* refactor: made suggested changes

* refactor: made suggested changes

* refactor: made suggested changes

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-12-02 18:27:53 +05:30
fedom
9d3d40b44e
feat: add 2-3-4-tree implment (#1366)
* feat: add 2-3-4 tree implment

* updating DIRECTORY.md

* docs: fix format issue of tab&space

* fix: fix code format issues

* fix: convert printf() to std::cout

* fix: fix some clang-tidy warnings

* fix: fix clang-tidy warnings of memory owning

* fix: remove use of  std::make_unique which is not support by c++11

* docs: improve documents

* fix: replace fprint with ofstream, and improve docs

* docs: improve docs for including header file

* docs: improve file doces

* fix: convert item type to int64_t, convert node item count type to int8_t

* refactor: Apply suggestions from code review

Add namespaces

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

* docs: remove obsolete comments

Co-authored-by: liuhuan <liuhuan@ainirobot.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2020-12-01 11:16:49 +05:30
CHILUKA UDAYCHANDRA
de99092144
feat: largest_power (#1406)
* largest_power

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* Update math/largest_power.cpp

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

* added a new line

* updating DIRECTORY.md

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-11-25 04:18:50 -05: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
Ricardo Andrés Marino Rojas
c8ce6f404c
feat: Create Bidirectional Dijkstra Algorithm (#1410)
* Create Bidirectional Dijkstra

Modified Dijkstra Algorithm with euclidean distance.

* Update Bidirectional Dijkstra

* Delete Bidirectional Dijkstra

* Create bidirectional_dijkstra.cpp

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* updating DIRECTORY.md

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.cpp

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

* Update bidirectional_dijkstra.cpp

Headers description added

* Fixed error in bidirectional_dijkstra.cpp

The third test cases didn't pass because there was an error in the Shortest_Path_Distance function in the indexes. The error has been fixed.

* Update bidirectional_dijkstra.cpp

Change of int into uint64_t

* Update bidirectional_dijkstra.cpp

* Update bidirectional_dijkstra.cpp

Int variables changed to uint64_t type

* Update bidirectional_dijkstra.cpp

Added description of input parameters

* Update graph/bidirectional_dijkstra.cpp

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

* Update graph/bidirectional_dijkstra.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>
2020-11-21 00:28:12 +05:30
Taj
a283f2a96f
Feat: added n_choose_r combinatorics algorithm (#1429)
* feat: added n_choose_r combinatorial algorithm

* fix: some type casting issue

* fix: MathJax documentation fix

* fix: MathJax documentation fix

* fix: MathJax notation fix

* fix: header comments

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

* fix: suggested changes to documentation

* updating DIRECTORY.md

* fix: suggested changes

* fix: suggested changes

* fix: namespace closing comment

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

* fix: removing a blank line

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

* fix: link issue

* fix: removed link

* fix: removed newline

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>
2020-11-17 01:09:52 +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
Akanksha-Gupta920
fb5e00f5fb
feat: Add Gram Schmidt Orthogonalisation (#1339)
* Add Gram Schmidt Orthogonalisation

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

After removing '&' while passing the parameters. The changes in array B are not reflected.

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

All the changes have been done and changes in B are also reflected.

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Fix spelling of brief

* updating DIRECTORY.md

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update gram_schmidt.cpp

* Update linear_algebra/gram_schmidt.cpp

* Update linear_algebra/gram_schmidt.cpp

* Update linear_algebra/gram_schmidt.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
2020-10-31 12:07:43 +05:30
webdesignbydivyansh
7b92e8d625
feat: Coin Change Problem (#1378)
* palindrome no

a program to check if a number is palindrome or not

* updated palindrome.cpp

* updated palindrome.cpp

missing equal to operator at line no 16

* flatten_a_binary_seach_tree

This program flattens a binary search tree or in simple words, converts it into linked list in sorted form

* a prog to convert bst into linked list

A code that is used to convert a binary search tree into linked list

* created merge k sorted arrays

this program displays all the elements from the different arrays(sorted) into 1 single array(sorted).

* updated braces in some parts

* included braces in line no 58

* included braces in line 58 and 60

* created trap_rainwater.cpp

A program to calculate the maximum amount of water that can be stored between buildings.

* deleted rainwater harvesting

* deleted palindrome

* deleted merge k sorted arrays

* deleted binary search tree to linked list

* deleted binary search tree to linked list

* created min_coins_topdown.cpp

This is another version of coins exchange problem solved using top down approach

* updated the code

please take a look at it

* final changes

* updated my code

* updating DIRECTORY.md

* changed int64_t to int8_t and int16_t

* edited line 3

* changed line 3

* edited line 3 & removed line 18

* added extra space

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-31 11:42:24 +05:30
Sarthak Sahu
c9d298fec6
feat: add fibonacci_sum.cpp (#1343)
* Johnson's Algorithm added

* Update Johnson's algorithm.cpp

@Panquesito7 plzz review

* Update Johnson's algorithm.cpp

* remove johnson'algo

* add fibo_sum.cpp

* updating DIRECTORY.md

* Update math/fibonacci_sum.cpp

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

* Update math/fibonacci_sum.cpp

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

* Update math/fibonacci_sum.cpp

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

* Update math/fibonacci_sum.cpp

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

* Update math/fibonacci_sum.cpp

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

* Update math/fibonacci_sum.cpp

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

* Update math/fibonacci_sum.cpp

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

* clang-format and clang-tidy fixes for a054b759

Co-authored-by: SarthakSahu1009 <sarthaksashu1009@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-10-30 23:23:02 +05:30
rudraprasaddas
15ce8ac92d
feat: Add Runge Kutta Method (#1286)
* Runge Kutta Method

* statically cast and initialised

* changes applied

* changes applied

* minor changes applied

* Proper Documentation updated

* Proper Documentation updated with suggestions

* minor changes

* added returns to rungeKutta function

* made a small commit

* updating DIRECTORY.md

* made a small change at line 99

* made a small change at line 99

* Changes made as suggested

* Changes updated

* espace reverted

* changes made in the documentation

* minor additions

* Update rungekutta.cpp

* Update change

* Changes removed

* Minor updates

* test functions added

* Test functions outside namespace

* non-static to static test function

* used vector

* changed function brief

* made a single test function

* made a single test function and made a slight change

* changed numerical method namespace description

* made changes in test function

* made slight changes as suggested

* Added a space

* Added the new suggestions

* updated in latex

Co-authored-by: Rudra Prasad Das <rudraiitism@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-30 21:59:24 +05:30
Shri Prakash Bajpai
fee3a74e35
feat: Add modular_exponentiation.cpp (#1276)
* Add modular_exponentiation

* Delete modular_exponentiation

* Add modular_exponentiation

* Update and rename modular_exponentiation to modular_exponentiation.cpp

* Update modular_exponentiation.cpp

* Update math/modular_exponentiation.cpp

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

* updating DIRECTORY.md

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

* Update modular_exponentiation.cpp

* Update modular_exponentiation.cpp

* Update modular_exponentiation.cpp

* Update modular_exponentiation.cpp

* Update modular_exponentiation.cpp

* Update math/modular_exponentiation.cpp

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

* Update math/modular_exponentiation.cpp

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

* clang-format and clang-tidy fixes for 053aea0b

* Update math/modular_exponentiation.cpp

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

* Update math/modular_exponentiation.cpp

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

* Update math/modular_exponentiation.cpp

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

* Update math/modular_exponentiation.cpp

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

* Update math/modular_exponentiation.cpp

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

* Update modular_exponentiation.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-30 01:52:32 +05:30
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
muskan0719
0f8324ed49
feat: add sum_of_binomial_coefficients (#1363)
* Add files via upload

* update sum_of_binomial_coefficients

* Update math/sum_of_binomial_coefficient.cpp

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

* Update math/sum_of_binomial_coefficient.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for e7ac2255

* Update math/sum_of_binomial_coefficient.cpp

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

* Update sum_of_binomial_coefficient.cpp

* Update math/sum_of_binomial_coefficient.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>
2020-10-28 14:23:57 +05:30
Ayaan Khan
2e277c354d
Merge pull request #1318 from neha-hasija17/patch-3
feat: Create magic_number.cpp
2020-10-27 23:12:23 +05:30
Ayaan Khan
6e9f3fd788
Merge pull request #1344 from chestamittal/master
feat: add lcm_sum.cpp
2020-10-27 23:02:27 +05:30
Sujay008
57a5dcb2c7
feat: add palindrome partitioning algorithm (#1319)
* feat: add palindrome partitioning algorithm

* Update palindrome_partitioning.cpp

* updating DIRECTORY.md

* Update palindrome_partitioning.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-25 13:21:24 -06:00
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
github-actions
ed033c38b3 updating DIRECTORY.md 2020-10-19 21:39:00 +00:00
Deep Raval
7f97119f8a
feat: Added Morse Code (#1322)
* Added Morse Code

* updating DIRECTORY.md

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

* Update ciphers/morse_code.cpp

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

* Update ciphers/morse_code.cpp

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

* Update ciphers/morse_code.cpp

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

* Update ciphers/morse_code.cpp

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

* Update ciphers/morse_code.cpp

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

* Update ciphers/morse_code.cpp

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

* Update ciphers/morse_code.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>
2020-10-19 16:25:28 -05:00
github-actions
581715db04 updating DIRECTORY.md 2020-10-18 20:13:56 +00: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
Akshay Anand
34a6faf401
adding word break DP approach (#1278)
* adding word break DP approach

* fixing formatting

* fixing linting issues

* adding documentation and other enhancements

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 061c21ae

* docs: fixed documentation

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* Update dynamic_programming/word_break.cpp

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

* clang-format and clang-tidy fixes for d8ab6b02

* Update dynamic_programming/word_break.cpp

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

* clang-format and clang-tidy fixes for 05d7ca14

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-10-16 15:54:42 -04:00
Arpan Mukherjee
a55e362ee1
Added Sparse Table for range query (#996)
* Added Sparse Table for range query

* Fixed Lint Warnings

* Fixed comments and Lint warnings

* Fixed comments

* Fixed comments and Lint warnings

* Fixed comments and Lint warnings

* Fixed variable reference Lint warnings

* Added documentation for functions parameters and return statements

* updating DIRECTORY.md

* Added documentation

* Applied namespace range_queries

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

* Updated wikipedia documentation link

* Resolved comments

* Fixed typo

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

* Resolved comments

* Added tests

* Cleaned up debugging statements

* Resolved comments

* Resolved Comments

* Update sparse_table.cpp

* Resolved comments

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

* Fixed comments

* Update sparse_table.cpp

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-10-16 12:38:00 -04:00
Krishna Pal Deora
06b6714b0e
Hopcroft–Karp algorithm implementation (#1087)
* Hopcroft–Karp algorithm implementation

The Hopcroft–Karp algorithm is an algorithm that takes as input a bipartite graph and produces as output a maximum cardinality matching.

* Update hopcroft_karp.cpp

* fix : fixed the issues

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update hopcroft_karp.cpp

Added Global variable as private variable

* Update hopcroft_karp.cpp

* Update hopcroft_karp.cpp

* Update hopcroft_karp.cpp

* Update hopcroft_karp.cpp

* Update hopcroft_karp.cpp

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update hopcroft_karp.cpp

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* updating DIRECTORY.md

* Update graph/hopcroft_karp.cpp

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

* clang-tidy fixes for 780580f71f

* Update graph/hopcroft_karp.cpp

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

* clang-tidy fixes for 03f97cb241

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* applied suggested changes

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

* Update graph/hopcroft_karp.cpp

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

* applied changes

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

* Update graph/hopcroft_karp.cpp

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

* improved documentation

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

* Update graph/hopcroft_karp.cpp

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

* Update graph/hopcroft_karp.cpp

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

* Update hopcroft_karp.cpp

* corrected code

* Update hopcroft_karp.cpp

* changed the class name

* applied suggested changes

included the HKGraph class and it's member functions inside namespace graph

* Update graph/hopcroft_karp.cpp

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

* Update hopcroft_karp.cpp

* Update hopcroft_karp.cpp

* added sample test cases

* Update DIRECTORY.md

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

* Update DIRECTORY.md

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: @8848hg <53469557+Himalay12@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-10-16 08:41:51 -04:00
Divyajyoti Ukirde
04e0acc3cf
feat: added check_factorial (#1155)
* feat: added check_factorial

* updating DIRECTORY.md

* feat: added check_factorial

* review changes

* review changes

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-10-05 08:52:27 -04:00
github-actions
a6a3b7deec updating DIRECTORY.md 2020-10-02 12:22:58 +00:00
Darshana Sarma
bcf79e259a
feat: Added Postfix Evaluation (#1083)
* feat:Added Postfix evaluation

* updating DIRECTORY.md

* Fixed global variable name and stack def

* Fixed c from int to float

* Fixed clang-tidy

* Modified code for larger values

* Added string header

* Suggested changes

* Fixed clang-tidy

* Apply suggestions from code review

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

* Added description for class

* Fixed function calling

* Apply suggestions from code review

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

* Updated evaluate function documentation

* Apply suggestions from code review

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

* Update others/postfix_evaluation.cpp

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

* Update others/postfix_evaluation.cpp

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>
Co-authored-by: Darshana-Sarma <lownish@hotmail.com>
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-09-30 13:48:39 -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
github-actions
0196573949 updating DIRECTORY.md 2020-09-23 18:42:14 +00:00
github-actions
508ea020d3 updating DIRECTORY.md 2020-09-04 00:14:24 +00: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
github-actions
63333f38cc updating DIRECTORY.md 2020-08-25 23:58:06 +00:00
github-actions
149fe0cd63 updating DIRECTORY.md 2020-08-25 12:23:25 +00:00
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
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
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
github-actions
d50f1c67c8 updating DIRECTORY.md 2020-08-16 19:33:27 +00:00
Filip Hlasek
def8f4937e
Refactor lowest comomon ancestor. (#980)
* Refactor lowest comomon ancestor.

* Fix linter warnings.

* Address comments and linter warnings.

* Added Kaprekar number implementation

* updating DIRECTORY.md

* Added Collatz Conjecture implementation

* updating DIRECTORY.md

* Added Ugly Numbers implementation

* updating DIRECTORY.md

* Add lowest common ancestor to the graph namespace.

* updating DIRECTORY.md

* static tests function

* Revert ugly number kaprekar and collatz.

Co-authored-by: Deepak Vijay Agrawal <64848982+DebugAgrawal@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-08-14 12:35:11 -04:00
github-actions
f7ff88e7d7 updating DIRECTORY.md 2020-08-09 02:14:27 +00:00
Filip Hlásek
2e43bbdfb3 Rename dfs to depth_first_search.: 2020-08-08 19:12:57 -07:00
Filip Hlásek
ce0896f196 Merge remote-tracking branch 'upstream/master' into fixgraph 2020-08-08 12:44:08 -07:00
github-actions
043c890524 updating DIRECTORY.md 2020-08-08 12:30:00 +00:00
github-actions
a2178f33cd updating DIRECTORY.md 2020-08-08 00:39:39 +00:00
Krishna Vedala
9eca384c79
[feature] hamilton cycle dynamic programming solution in O(2^n*n) time and memory (#972)
* hamilton cycle dynamic programming solution in O(2^n*n) time and memory for n <= 20(n is number of vertices)

* tests added in hamilton-cycle

* stylistical fixes

* endline added

* assert for tests added

* some more fixes delete replaced with delete[] and comment extended od main function

* comments added like about author

* file descriptions added in hamiltons-cycle.cpp

* fix code per standards

* fix filename per repo standards

* code optimized

* updating DIRECTORY.md

* fixes: docs + optimization

* fix pre

* update main function docs

* move file from dynamic_programming to more appropriate graph

* updating DIRECTORY.md

* fix filename

* updating DIRECTORY.md

Co-authored-by: vakhokoto <v.kotoreishvili@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-29 13:39:13 -04: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
github-actions
01ba336866 updating DIRECTORY.md 2020-07-20 17:51:30 +00:00
github-actions
193f9c466a updating DIRECTORY.md 2020-07-19 20:46:35 +00:00
github-actions
eaf4bb2019 updating DIRECTORY.md 2020-07-19 18:50:47 +00: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
github-actions
e07b0ce9f8 updating DIRECTORY.md 2020-07-18 21:01:51 +00: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
github-actions
076d156302 updating DIRECTORY.md 2020-07-13 13:34:13 +00:00
github-actions
1fbd0d59ac updating DIRECTORY.md 2020-07-10 21:38:04 +00:00
Krishna Vedala
05bb23ca27
[enhancement] New Graphics implementation with algorithm for spirograph (#936)
* added spirograph program

* add graphics forlder to cmake

* updating DIRECTORY.md

* enable VNC for GUI programs on gitpod

* fix cpplint error

* fix macro definitions for correct documentation

* fix filename in docs

* move include from namespace to global

* download and build freeglut if not available

* install opengl libraries for build check

* fix syntax error

* fix quotes

* install mesa-utils instead

* use markepplace tool instead of installing

* fix syntax

* undo changes to github actions

* OpenGL not mandatory

* add private option to compile definition

* fix: corrected to compile definitions instead of options

* use the macro USE_GLUT

* compile FREEGLUT as a subdirectory. this maintains a consistency

* build freeglut_static when GLUT library not available

* provide keyboard control

* clang-tidy fixes for cb284bddb2

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-10 12:47:37 -04:00
Krishna Vedala
f16093cf7b
Merge pull request #917 from kvedala/hill_cipher
[feature] Hill cipher algorithm
2020-06-29 08:31:37 -04:00
github-actions
0b57b89543 updating DIRECTORY.md 2020-06-27 00:37:39 +00:00
github-actions
dcd0d6b478 updating DIRECTORY.md 2020-06-26 13:04:18 +00:00
github-actions
e22f56c906 updating DIRECTORY.md 2020-06-25 18:43:00 +00:00
github-actions
21093365cd updating DIRECTORY.md 2020-06-25 09:51:24 +00:00
github-actions
26ffe8c6d7 updating DIRECTORY.md 2020-06-23 19:34:19 +00:00
github-actions
7393d88811 updating DIRECTORY.md 2020-06-23 19:02:47 +00:00
Krishna Vedala
96ed582eb2
Merge pull request #874 from kvedala/minima-algorithm
[feat:] Minima algorithm
2020-06-22 22:48:23 -04:00
Krishna Vedala
db9fa4dd40
Merge pull request #878 from kvedala/brents-method
feat: Brent's method to find extrema
2020-06-22 22:46:18 -04:00
github-actions
58d5f3ea11 updating DIRECTORY.md 2020-06-22 12:05:14 +00:00
github-actions
1c4026bca1 updating DIRECTORY.md 2020-06-22 02:31:55 +00:00
matgrz1993
d9fc878962
fix: Remove FenwickTree (#856)
* Remove FenwickTree

FenwickTree is the same Data Structure as Binary Indexed Tree located in file "range_queries/bit.cpp" so it could be removed.

* Fix cpplint errors

* docs: Update documentation

* docs: Update FenwickTree documentation

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-06-22 01:11:08 +05:30
github-actions
0f5e880376 updating DIRECTORY.md 2020-06-21 17:42:10 +00:00
github-actions
33b8169f41 updating DIRECTORY.md 2020-06-21 04:10:37 +00:00
Krishna Vedala
aaa08b0150
Major rework to improve code quality and add automation checks (#805)
* delete secant method - it is identical to regula falsi

* document + improvize root finding algorithms

* attempt to document gaussian elimination

* added file brief

* commented doxygen-mainpage, added files-list link

* corrected files list link path

* files-list link correction - this time works :)

* document successive approximations

* cleaner equation

* updating DIRECTORY.md

* documented kmp string search

* document brute force string search

* document rabin-karp string search

* fixed mainpage readme

* doxygen v1.8.18 will suppress out the #minipage in the markdown

* cpplint correction for header guard style

* github action to auto format source code per cpplint standard

* updated setting to add 1 space before `private` and `public` keywords

* auto rename files and auto format code

* added missing "run" for step

* corrected asignmemt operation

* fixed trim and assign syntax

* added git move for renaming bad filenames

* added missing pipe for trim

* added missing space

* use old and new fnames

* store old fname using echo

* move files only if there is a change in filename

* put old filenames in quotes

* use double quote for old filename

* escape double quotes

* remove old_fname

* try escape characters and echo"

* add file-type to find

* cleanup echo

* ensure all trim variables are also in quotes

* try escape -quote again

* remove second escpe quote

* use single quote for first check

* use carets instead of quotes

* put variables in brackets

* remove -e from echo

* add debug echos

* try print0 flag

* find command with while instead of for-loop

* find command using IFS instead

* 🎉 IFS fix worked - escaped quotes for git mv

* protetc each word in git mv ..

* filename exists in lower cases - renamed

* 🎉 git push enabled

* updating DIRECTORY.md

* git pull & then push

* formatting filenames d7af6fdc8c

* formatting source-code for d7af6fdc8c

* remove allman break before braces

* updating DIRECTORY.md

* added missing comma lost in previous commit

* orchestrate all workflows

* fix yml indentation

* force push format changes, add title to DIRECTORY.md

* pull before proceeding

* reorganize pull commands

* use master branches for actions

* rename .cc files to .cpp

* added class destructor to clean up dynamic memory allocation

* rename to awesome workflow

* commented whole repo cpplint - added modified files lint check

* removed need for cpplint

* attempt to use actions/checkout@master

* temporary: no dependency on cpplint

* formatting filenames 153fb7b8a5

* formatting source-code for 153fb7b8a5

* updating DIRECTORY.md

* fix diff filename

* added comments to the code

* added test case

* formatting source-code for a850308fba

* updating DIRECTORY.md

* added machine learning folder

* added adaline algorithm

* updating DIRECTORY.md

* fixed issue [LWG2192](https://cplusplus.github.io/LWG/issue2192) for std::abs on MacOS

* add cmath for same bug: [LWG2192](https://cplusplus.github.io/LWG/issue2192) for std::abs on MacOS

* formatting source-code for f8925e4822

* use STL's inner_product

* formatting source-code for f94a330594

* added range comments

* define activation function

* use equal initial weights

* change test2 function to predict

* activation function not friend

* previous commit correction

* added option for predict function to return value before applying activation function as optional argument

* added test case to classify points lying within a sphere

* improve documentation for adaline

* formatting source-code for 15ec4c3aba

* added cmake to geometry folder

* added algorithm include for std::max

* add namespace - machine_learning

* add namespace - statistics

* add namespace - sorting

* added sorting algos to namespace sorting

* added namespace string_search

* formatting source-code for fd69530515

* added documentation to string_search namespace

* feat: Add BFS and DFS algorithms to check for cycle in a directed graph

* Remove const references for input of simple types

Reason: overhead on access

* fix bad code

sorry for force push

* Use pointer instead of the non-const reference

because apparently google says so.

* Remove a useless and possibly bad Graph constuctor overload

* Explicitely specify type of vector during graph instantiation

* updating DIRECTORY.md

* find openMP before adding subdirectories

* added kohonen self organizing map

* updating DIRECTORY.md

* remove older files and folders from gh-pages before adding new files

* remove chronos library due to inacceptability by cpplint

* use c++ specific static_cast instead

* initialize radom number generator

* updated image links with those from CPP repository

* rename computer.... folder to numerical methods

* added durand kerner method for root computation for arbitrarily large polynomials

* fixed additional comma

* fix cpplint errors

* updating DIRECTORY.md

* convert to function module

* update documentation

* move openmp to main loop

* added two test cases

* use INT16_MAX

* remove return statement from omp-for loop and use "break"

* run tests when no input is provided and skip tests when input polynomial is provided

* while loop cannot have break - replaced with continue and check is present in the main while condition

* (1) break while loop (2) skip runs on break_loop instead of hard-break

* add documentation images

* use long double for errors and tolerance checks

* make iterator variable i local to threads

* add critical secions to omp threads

* bugfix: move file writing outside of the parallel loop
othersie, there is no gurantee of the order of roots written to file

* rename folder to data_structures

* updating DIRECTORY.md

* fix ambiguous symbol `size`

* add data_structures to cmake

* docs: enable tree view, add timestamp in footer, try clang assistaed parsing

* doxygen - open links in external window

* remove invalid parameter from function docs

* use HTML5 img tag to resize images

* move file to proper folder

* fix documentations and cpplint

* formatting source-code for aacaf9828c

* updating DIRECTORY.md

* cpplint: add braces for multiple statement if

* add explicit link to badges

* remove  duplicate line

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

* remove namespace indentation

* remove file associations in settings

* add author name

* enable cmake in subfolders of data_structures

* create and link object file

* cpp lint fixes and instantiate template classes

* cpp lint fixes and instantiate template classes

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

* cpplint - ignore `build/include`

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

* disable redundant gcc compilation in cpplint workflow

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

* template header files contain function codes as well and removed redundant subfolders

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

* updating DIRECTORY.md

* remove semicolons after functions in a class

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

* cpplint header guard style

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

* remove semilon

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

* added LU decomposition algorithm

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

* added QR decomposition algorithm

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

* use QR decomposition to find eigen values

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

* updating DIRECTORY.md

* use std::rand for thread safety

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

* move srand to main()

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

* cpplint braces correction

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

* updated eigen value documentation

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

* fix matrix shift doc

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

* rename CONTRIBUTION.md to CONTRIBUTING.md #836

* remove 'sort alphabetical order' check

* added documentation check

* remove extra paranthesis

* added gitpod

* added gitpod link from README

* attempt to add vscode gitpod extensions

* update gitpod extensions

* add gitpod extensions cmake-tools and git-graph

* remove gitpod init and add commands

* use init to one time install doxygen, graphviz, cpplint

* use gitpod dockerfile

* add ninja build system to docker

* remove configure task

* add github prebuild specs to gitpod

* disable gitpod addcommit

* update documentation for kohonen_som

* added ode solve using forward euler method

* added mid-point euler ode solver

* fixed itegration step equation

* added semi-implicit euler ODE solver

* updating DIRECTORY.md

* fix cpplint issues - lines 117 and 124

* added documentation to ode group

* corrected semi-implicit euler function

* updated docs and test cases better structure

* replace `free` with `delete` operator

* formatting source-code for f55ab50cf2

* updating DIRECTORY.md

* main function must return

* added machine learning group

* added kohonen som topology algorithm

* fix graph image path

* updating DIRECTORY.md

* fix braces

* use snprintf instead of sprintf

* use static_cast

* hardcode character buffer size

* fix machine learning groups in documentation

* fix missing namespace function

* replace kvedala fork references to TheAlgorithms

* fix bug in counting_sort

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Anmol3299 <mittalanmol22@gmail.com>
2020-06-19 21:34:56 +05:30
github-actions
70a2aeedc3 updating DIRECTORY.md 2020-06-13 15:45:53 +00:00
github-actions
2829734532 updating DIRECTORY.md 2020-06-12 22:47:55 +00:00
github-actions
55c21c86e1 updating DIRECTORY.md 2020-06-02 15:13:18 +00:00
github-actions
46aba07f20 updating DIRECTORY.md 2020-05-30 14:58:01 +00:00
github-actions
5a54093484 updating DIRECTORY.md 2020-05-27 13:24:42 +00:00
github-actions
d86ff19d44 updating DIRECTORY.md 2020-05-27 12:14:45 +00:00
github-actions
6b55d4472f updating DIRECTORY.md 2020-05-25 15:18:11 +00:00
github-actions
258200ec9f updating DIRECTORY.md 2020-05-24 12:09:31 +00:00
github-actions
b1bacb03b5 updating DIRECTORY.md 2020-05-24 06:47:38 +00:00
github-actions
34337c7bc3 updating DIRECTORY.md 2020-05-24 04:44:27 +00:00
github-actions
09d40e008a updating DIRECTORY.md 2020-05-24 04:42:45 +00:00
github-actions
1c19d850e0 updating DIRECTORY.md 2020-05-23 16:13:05 +00:00