Commit Graph

1645 Commits

Author SHA1 Message Date
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
Mindaugas
29f54393f3
feat: add Stooge sort algorithm (#2440)
* feat: add Stooge sort algorithm

* docs: add documentation for function parameters and includes

* test: add new tests for the Stooge sort

* docs: Update functions descriptions

* fix: Update parameter type to size_t

* doc: Add message that the tests have passed

* fix: Update return statement structure

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-04-14 17:53:25 -06:00
David Leal
f04e038056
chore: update the CodeQL workflow (#2449) 2023-04-14 17:41:02 -06:00
futoid
fddbf08f5a
feat: added log code for counting digits (#2234)
* added log code for counting digits

* one space removed

* fix: CI warnings (hopefully)

* fix: revert for now

* decoupled test functions

* Update math/finding_number_of_digits_in_a_number.cpp

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

* Update math/finding_number_of_digits_in_a_number.cpp

typo changes

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

* uint64_t changed to double to resolve clang-tidy warnings

* clang-format and clang-tidy fixes for 61bb2dea

* comment improvement

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

* guarded required function

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2023-04-14 12:40:14 -06:00
Piotr Idzik
65efd47bc1
fix: remove memory leak in reverse_a_linked_list.cpp (#2439)
* style: remove unused header

* fix: add destructor to list

* style: add missing constructors, make some methods const

* fix: google-readability-braces-around-statements

* fix: suppress some warnings

* docs: remove meaningless documentation

* docs: add missing documentation

* style: check if isEmpty in copy_all_nodes_from_list

* style: declare variables in seperate lines

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-03-30 14:19:26 -06:00
David Leal
1d2c5d9d97
feat: add Sieve of Eratosthenes (originally by @thechubbypanda) (#2442)
* feat: add Sieve of Eratosthenes

Originally created by @thechubbypanda.

* updating DIRECTORY.md

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: Keval Kapdee <keval@thechubbypanda.net>
2023-03-29 14:24:13 -06:00
Suman Mondal
0f20cdcf8f
feat: add maximum circular subarray sum (#2242)
* Create maximum_circular_subarray.cpp

* Delete maximum_circular_subarray.cpp

* Create maximum_circular_subarray.cpp

* Update maximum_circular_subarray.cpp

Used the template provided.

* updating DIRECTORY.md

* Update maximum_circular_subarray.cpp

* Update maximum_circular_subarray.cpp

* Update maximum_circular_subarray.cpp

* Update maximum_circular_subarray.cpp

* Update maximum_circular_subarray.cpp

* Update dynamic_programming/maximum_circular_subarray.cpp

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

* Update maximum_circular_subarray.cpp

* Update dynamic_programming/maximum_circular_subarray.cpp

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

* Update dynamic_programming/maximum_circular_subarray.cpp

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

* Update dynamic_programming/maximum_circular_subarray.cpp

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

* Update dynamic_programming/maximum_circular_subarray.cpp

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

* Update dynamic_programming/maximum_circular_subarray.cpp

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

* Update dynamic_programming/maximum_circular_subarray.cpp

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

* Update maximum_circular_subarray.cpp

Fixed the comments according to @krishnacx

* chore: apply suggestions from code review

---------

Co-authored-by: Suman Mondal <94859440+sumanarlert@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-02-06 14:11:52 -06:00
Piotr Idzik
cc33efd3b6
[fix/feat]: remove memory leak in avltree.cpp (#2429)
* fix: remove memory leak by adding deleteAllNodes

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

* docs: explain usage of standard headers

* docs: use doxygen syntax

* docs: document parameters of the functions

* style: use proper spelling

* style: simplify logic in deleteNode

* docs: add missing [in]

* docs: add missing slashes

* docs: document `main`

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

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for c852f62d

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-02-03 18:40:26 -06:00
Prafful Gupta
dc8ecfbf50
feat: add power of two algorithm (#2224)
* feat: add power_of_two.cpp

* chore: minor changes

* fix: Windows CI issues

* chore: remove unnecessary namespace

---------

Co-authored-by: David Leal <halfpacho@gmail.com>
2023-02-03 15:12:19 -06:00
Luiz Carlos Cosmi Filho
a8af29bf65
feat: add k-nearest neighbors algorithm (#2416)
* feat: add k-nearest neighbors, class Knn

* updating DIRECTORY.md

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

* fix: comments in k-nearest neighbors

* test: add more tests for k-nearest-neighbors algorithm

* fix: description of k-nearest neighbors algorithm

* chore: apply suggestions from code review

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2023-01-31 13:47:26 -06:00
David Leal
b89d1da2f1
chore: update FreeGLUT to v3.2.2 (#2432) 2023-01-31 10:20:47 -06:00