Commit Graph

1655 Commits

Author SHA1 Message Date
github-actions[bot]
f49369065c
docs: update DIRECTORY.md (#2521)
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-09-06 11:35:38 -06:00
David Leal
6daf7015e3
chore: run directory workflow daily 2023-08-04 15:06:36 -06:00
David Leal
2c68b68ca6
fix: add missing namespace in Dijkstra 2023-07-24 18:52:45 -06:00
David Leal
17c374dc14
[feat/docs/fix]: improve the Dijkstra algorithm (#2508)
Originally initiated in #2490.
Co-authored-by: Mark Matthew Vergara <mmvergara@users.noreply.github.com>
2023-07-24 18:49:51 -06:00
David Leal
b480ddb191
docs: add documentation in kruskals_minimum_spanning_tree.cpp (#2482)
* docs: add documentation in `kruskals_minimum_spanning_tree.cpp`

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

* chore: remove myself as an author

* chore: `std::endl` -> `\n`

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-07-21 12:17:24 -06:00
David Leal
882ba119dc
[feat/docs]: improve Fenwick Tree algorithm (#2506)
* [feat/docs]: improve Fenwick Tree algorithm

* chore: apply suggestions from code review

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

---------

Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-07-21 12:16:15 -06:00
Vikrant A P
a39892b80f
fix: wrong contributing guidelines link (#2507)
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-07-20 23:21:09 -06:00
KAIRAO ZHENG
170f7e59ff
feat: Treap Data Structure (#2458)
* feat: Treap Data Structure

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: suggested changes

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: add more self-tests

* fix: suggested changes

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* suggested changes

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

* suggested changes

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

* suggested changes

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

* suggested changes

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

* suggested changes

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

* suggested changes

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

* suggested changes

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

* suggested changes

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

* suggested changes

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

* fix: add namespace prefixs

* suggested changes

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

* fix: use containers

* fix: add initialization

* fix: suggested changes

* fix: a few `clang-tidy` warnings

* fix: segmentation fault

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-07-20 23:05:40 -06:00
Stressed
17a532637a
feat: add Iterative Factorial (#2453)
* Feat: Iterative factorial

* Test: Added tests for iterative factorial

* Fix: Added throw when argument exceeds maximum
Docs: Updated docs to to explain why maximum is 20

* Feat: iterative_factorial
docs: Added documentation to some functions.
test: Added exception test.

* chore: Fixed formatting

* docs: Added documentation, changed examples.

* Update math/iterative_factorial.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/iterative_factorial.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/iterative_factorial.cpp

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

* Update math/iterative_factorial.cpp

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

* chore: apply suggestions from code review

* Update math/iterative_factorial.cpp

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

* Update math/iterative_factorial.cpp

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

* Fix: Exception test termination bug

* Update math/iterative_factorial.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/iterative_factorial.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2023-07-20 22:45:57 -06:00
Ryan Bevin
25b9e0a159
feat: update cmake to use a newer version (#2505)
Co-authored-by: rbevin777 <rbevin7@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-07-20 19:23:12 +05:30
ewd00010
aaf84ab08f
fix: fit approximate_pi.cpp to guidelines (#2499)
* Update approximate_pi.cpp

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

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-07-19 14:53:16 -06:00
David Leal
7003ba83ea
feat: improve the Armstrong Number algorithm (#2480)
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-07-19 14:33:55 -06:00
realstealthninja
37aae7ced4
docs: fit factorial.cpp to contribution guidelines (#2487)
* doc: fit factorial.cpp to contribution guidelines

* Update math/factorial.cpp

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

* chore: remove redundant include

* docs: add documentation for parameter `n`

* clang-format and clang-tidy fixes for ec43ea0f

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-07-18 22:53:15 -06:00
David Leal
813175a544
feat: upgrade FreeGlut to v3.4.0 (#2478)
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-07-10 19:39:13 +05:30
David Leal
baaece2515
chore: add endline on PR template 2023-07-05 22:52:32 -06:00
David Leal
f4d1aa1706
chore: add the linter to a separate Python script (#2500) 2023-07-05 15:01:58 -06:00
Piotr Idzik
32db99c1de
[fix/docs]: cleanup longest_common_string.cpp (#2462)
* updating DIRECTORY.md

* fix: cleanup longest_common_string.cpp

* clang-format and clang-tidy fixes for 3280d46e

* docs: explain why utility header is needed

* refactor: add test_all()

* docs: add relevant doc-strs

* refactor: rename to tests()

* style: typo fix

* style: use string instead of str

* Apply suggestions from code review

The code after this commit requires reformatting.

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

* clang-format and clang-tidy fixes for 18203b20

* style: give an exact reason why iostream is needed

* style: make all test functions `static`

* docs: update missing docs

* chore: apply suggestions from code review

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-07-03 23:40:35 -06:00
ewd00010
e3f0551f98
[fix/docs]: fit check_amicable_pair.cpp to guidelines (#2465)
* Quality of life

FIX:  initlized sum to 1 instead of adding it before return
CHORE: cleaned documentation aswell as adding new documentation, namespace math added

* Update math/check_amicable_pair.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_amicable_pair.cpp

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

* Update math/check_amicable_pair.cpp

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

* Update math/check_amicable_pair.cpp

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

* clang-format and clang-tidy fixes for bc87fea5

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

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-06-23 14:06:42 -06:00
David Leal
72cd2d0eb9
fix: directory writer on event 2023-06-23 13:51:00 -06:00
kunal nayak
d1ec37c67b
feat: add Next Higher Number with same set bits (#2484)
* Next higher number with same set bits implimented

* Added to DIRECTORY.md

* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp

new line aded

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

* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp

* added

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

* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp

recomendation added

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

* Update next_higher_number_with_same_number_of_set_bits.cpp

int to int64_t

* Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-06-23 13:45:11 -06:00
David Leal
e203bfee4e
fix: use correct branch name 2023-06-23 12:04:16 -06:00
realstealthninja
2fd530cba1
[fix/docs]: fit armstrong_number.cpp to guidelines (#2457)
* fix: fit armstrong_number.cpp to guidelines

* chore: delete unnecessary whitespace

* updating DIRECTORY.md

* fit: aliquot_sum to contribution guidelines

added a math formula

* chore: add print statement mentioning tests have passed

* Update math/armstrong_number.cpp

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

* Update math/armstrong_number.cpp

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

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-06-20 16:00:41 -06:00
David Leal
5dc34677ed
Revert "feat: update CMake version" (#2489)
* Revert "feat: update CMake version to 3.26.4 (#2486)"

This reverts commit 2d492834b1.

* clang-format and clang-tidy fixes for d40bf643

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-06-20 15:49:45 -06:00
Sujal Gupta
2d492834b1
feat: update CMake version to 3.26.4 (#2486)
* update cmake version

* clang-format and clang-tidy fixes for 402c5627

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-06-16 16:08:45 -06:00
Stoycho Kyosev
d7a9869dce
feat: add Boyer Moore algorithm implementation (#2441)
* add boyer moore algorithm implementation

* add a one-line description of what the library/header is for

* fix comments pattern and make tests static

* add documentation

* add namespaces

* fix all warnings for clang-tydy.exe <filename>

* Change lib from limits to climits (CHAR_MAX macro)

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

* Add breif description of boyer-moore algorithm

* Fix styling

* Add needed documentation

* my commit

* fix type of index_pattern

* Fix clang-warnings

* chore: apply suggestions from code review

* chore: add print message after tests

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update strings/boyer_moore.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* fix: variable name

* Update strings/boyer_moore.cpp

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

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-06-16 15:38:38 -06:00
ewd00010
5ef7ad5cfe
[feat/docs/fix]: fit check_prime.cpp to guidelines (#2460)
* check_prime_update

docs: added links to file @brief and @details. moved previous @brief to be with function, made comments easier to read in general and added boilerplate documentation to functions.
chore: removed bool result and most brackets in is_prime. Moved assert tests to their own function and added more in, test success now returns message.

* Delete cmake-build-debug directory

* clang-format

* original box_stacking documentation

start point

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Delete box_stacking.cpp

* Update check_prime.cpp

improved files @details text, removed generic t template - replaced with long long

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update check_prime.cpp

removed cin/cout interaction

* Update check_prime.cpp

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_prime.cpp

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

* Update check_prime.cpp

* Update math/check_prime.cpp

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

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-06-16 15:27:53 -06:00
ewd00010
5704841875
[feat/docs/fix]: fit check_factorial.cpp to guidelines (#2466)
* Quality of life update

FIX: added namespace math, changed for a weird for loop to a while loop with a better conditional and I initiation
CHORE: Cleaned documentation and added details plus links. removed the invalid cout lines in test for one line.

* Update math/check_factorial.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_factorial.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_factorial.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* Update math/check_factorial.cpp

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

* Update math/check_factorial.cpp

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

* Update math/check_factorial.cpp

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

* Update math/check_factorial.cpp

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

* Update math/check_factorial.cpp

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

* chore: apply suggestions from code review

* Updated last return in is_factorial

* Update math/check_factorial.cpp

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

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-06-16 15:25:06 -06:00
Md. Anisul Haque
ff80be4b0a
feat: Add SHA-256 hashing algorithm (#2470)
* feat: add sha256 algorithm

* Apply suggestions from code review

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

* fix: suggested changes

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for de9c0b9c

* fix: suggested changes

* fix: suggested changes

* clang-format and clang-tidy fixes for 86e65fe8

* fix: suggested changes

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

* Update hashing/sha256.cpp

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

* fix: suggested changes

* fix: Apply suggestions from code review

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

* clang-format and clang-tidy fixes for a3d73339

* fix: suggested changes

* fix: made some required changes

* fix: suggested changes

* fix: Apply suggestions from code review

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

* clang-format and clang-tidy fixes for 356be83b

* fix: suggested changes

* fix: added more tests

* fix: Apply suggestions from code review

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

* fix: suggested changes

* chore: apply suggestions from code review

* chore: add print message after tests

* clang-format and clang-tidy fixes for 48191bbe

* fix: suggested changes

---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-06-16 15:24:31 -06:00
David Leal
1bfd46e92c
docs: update workflow versions in README.md (#2483) 2023-06-16 15:18:06 -06:00
David Leal
1a6ca12456
feat: add physics to CMake lists (#2481) 2023-06-16 15:17:34 -06:00
David Leal
0953376d31
feat: use directory workflow from the... (#2485)
...`scripts` repository
2023-06-16 15:12:12 -06:00
David Leal
4aa529c728
chore: remove Taj from codeowners 2023-06-14 09:32:13 -06:00
David Leal
b0b183df92
feat: add memory game and a games folder (#2471)
* feat: add memory game and a games folder

* fix: `clang-tidy` warnings (hopefully)

* fix: use `random_shuffle`

`random_shuffle` was removed in C++17, however, we're using C++11 here, so there should be no harm.

* updating DIRECTORY.md

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

* fix: remove repeated `random` header

* clang-format and clang-tidy fixes for 02786880

* fix: Windows build errors

* fix: CI warnings (hopefully)

* fix: CI warnings

* fix: (finally) CI warnings

* fix: wrong parameter name

* fix: yet another attempt to fix CI

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-06-12 10:17:36 -06:00
David Leal
26f6e98d9e
chore: add cpu_scheduling_algorithms to CMake (#2477) 2023-06-09 10:08:38 -06:00
David Leal
c876e50a7b
feat: add Kelvin to Celsius conversion algorithm (#2475)
* feat: add Kelvin to Celsius conversion algorithm

* updating DIRECTORY.md

* chore: apply suggestions from code review

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

* chore: apply suggestions from code review

Co-authored-by: Piotr Idzik <vil02@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
Co-authored-by: Piotr Idzik <vil02@users.noreply.github.com>
2023-06-08 10:03:59 -06:00
David Leal
ea4100e394
chore: add codeowners (#2474) 2023-05-31 11:51:36 -06:00
Piotr Idzik
33750ec1f8
fix: cover the cases n == 0 and m < n in N_bonacci (#2468)
* fix: make N_bonacci return an array of size m

* tests: simplify test, add new test cases

* style: remove unused include, update include justifications

* fix: cover the case n == 0
2023-05-30 20:48:05 -06:00
David Leal
0934ec4a8a
feat: label PR on CI fail (WIP) (#2455)
* feat: label PR on CI fail

* updating DIRECTORY.md

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-05-19 19:23:40 -06:00
David Leal
4f4585d4c1
docs: improve longest_palindromic_subsequence.cpp (#2467) 2023-05-19 19:22:54 -06:00
Piotr Idzik
4fc14710b6
fix: segv in longest_palindromic_subsequence.cpp (#2461)
* fix: initialise properly res, set properly size of ans

* test: add check with empty input

* style: use const reference as input type

* refactor: add ind_type

* style: use reverse interators to b

* style: use auto in definition of idx

* updating DIRECTORY.md

* style: clean-up includes

* style: use std::string::size_type in definition of ind_type

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-05-18 11:26:06 -06:00
WoWS17
6027480643
feat: add well-formed parentheses generator (#2445)
* feat: add well-formed parentheses generator

* updating DIRECTORY.md

* changes made

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* Update backtracking/generate_parentheses.cpp

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

* chore: apply suggestions from code review

* Update backtracking/generate_parentheses.cpp

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* updating DIRECTORY.md

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2023-05-16 13:32:47 -06:00
realstealthninja
4b740d464c
fix: fit euler's totient to the contribution guidelines (#2447)
* fix: fit euler's totient to the contribution guidelines.

* Update math/eulers_totient_function.cpp

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

* Update math/eulers_totient_function.cpp

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

* fix: add more tests

notes: i should have added euler's number first

* fix: revert description

* Update math/eulers_totient_function.cpp

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

* Update math/eulers_totient_function.cpp

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

* chore: apply suggestions from code review

* chore: apply suggestions from code review

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-04-28 13:56:52 -06:00
Stressed
a0227012ec
feat: add Quadratic equations complex numbers (#2451)
* Added quadratic_equations_complex_numbers.cpp

* Added a demonstration

* Added test cases

* Added test cases

* Revert "Added test cases"

This reverts commit a1433a9318.

* Added test cases and made docs /// instead of //

* test: Added test cases for quadraticEquation
docs: Changed comment style

* test: more test cases
docs: added documentation

* docs: Updated description

* chore: removed redundant returns

* chore: fixed formatting to pass Code Formatter checks

* chore: apply suggestions from code review

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>

* test: Added exception test

* Update math/quadratic_equations_complex_numbers.cpp

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

* Update math/quadratic_equations_complex_numbers.cpp

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

* Update math/quadratic_equations_complex_numbers.cpp

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

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
2023-04-28 13:53:19 -06:00
Nishant Chatterjee
1a1570d775
feat: Segment Tree Data Structure (#2444)
* Segment Tree

* fix: conformed to guidelines

* fix: changed int to template type T in few places

* fix: suggested changes

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

* fix: suggested changes

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

* fixed: suggested changes

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

* fix: suggested changes

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

* fix: suggested changes

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

* fix: suggested changes

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

* fix: suggested changes

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

* fix: suggested changes

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

* fix: suggested changes

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

* fix: remove duplicate line

* Update segment_tree.cpp

* chore: apply suggestions from code review

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-04-28 08:43:22 -06:00
David Leal
c0c27153cd
fix: self-test example not working 2023-04-26 19:08:19 -06:00
David Leal
4ca4333efe
docs: add more tests in the contributing guidelines 2023-04-26 18:59:57 -06:00
David Leal
fe671029c3
docs: improve contributing guidelines 2023-04-26 11:26:03 -06:00
David Leal
eb8bb3c4ee
chore: fix CodeQL badge 2023-04-23 00:23:50 -06:00
David Leal
7999ff54ae
docs: add missing return 0; 2023-04-21 10:12:03 -06:00
David Leal
842c4ab5dd
docs: add self-test examples (#2452)
* docs: add self-test examples

* updating DIRECTORY.md

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-04-21 10:10:54 -06:00