* feat: add new median search algorithm with linked list
* Removed filename
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Requested changes made
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Added algorithm and implementation explanations. Also added wikipedia link.
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Added @brief and wikipedia link to algo
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* moved includes to top of file
* fix: clang-tidy fixes applied
* fix: clang-tidy fixes
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for b24ca86e
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* clang-format and clang-tidy fixes for 247e0616
* fix: fixed test case failing
* clang-format and clang-tidy fixes for 4c1400db
* fix: test cases now pass
* clang-format and clang-tidy fixes for f3027971
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update search/median_search2.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* clang-format and clang-tidy fixes for b8b5f5fd
* clang-format and clang-tidy fixes for d67d450c
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: add bloom_filter.c(bloom filter and bitset for it)
* updating DIRECTORY.md
* docs: add comments to bloom_filter
* test: add tests and minor fixes
* docs: more common docs
* fix: clang-tidy warnings fix
* fix: clang-forma - minor fixes
* fix: line-space and better naming in hashStr
* updating DIRECTORY.md
* fix: apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: test_bitset was moved before main. Changed description for template T parameter
* Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: namespace fix
* fix: minor style fix
* Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: params names was removed from prototypes
* Update data_structures/bloom_filter.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* docs: minor improvements/fixes
Co-authored-by: David <Panquesito7@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: power_of_two algorithm redundant conditional 'else'
* feat : add modular_inverse_simple
* updating DIRECTORY.md
* fix : according lint rules
* fix : removed macro and initialize variable aux
* fix: remove namespace std like default
* feat : add unsigned type for block negative number and improving description
* fix: defined in header <cstdint> for use uint64_t type
* fix: improving descriptive comments
* fix: remove redundant lib
* fix: improvinf "brief" and "details" acording suggestion in review
* fix: improving descrition of function imod acording suggestion in review
* fix: improving descrition acording suggestion in review
* Update modular_inverse_simple.cpp
* Apply suggestions from code review
* clang-format and clang-tidy fixes for 768a99c8
* Apply suggestions from code review
* Apply suggestions from code review
* updating DIRECTORY.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: CI workflow not being able to commit to...
...the `master` branch.
This is due to the branch protection: we cannot add `github-actions` as administrator to skip the protection. So let's add my name which has administrator permissions, that should work.
UNTESTED, might not work.
* Let's test it
* updating DIRECTORY.md
Co-authored-by: David <Panquesito7@users.noreply.github.com>
* feat : Implemented Inverse Fast Fourier Transform
Slightly different from fast Fourier transform
Just the om variable declared in line 40 is divided by n
and swapping the testing inputs with testing outputs .
* Update numerical_methods/Inverse_fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update numerical_methods/Inverse_fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update numerical_methods/Inverse_fast_fourier_transform.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* formatting filenames d7f9a946
* updating DIRECTORY.md
* fix : optimized the code
* Apply suggestions from code review
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>
* feat: added math/area.cpp
* feat: added surface area of sphere, cube and cylinder
* docs: modified @brief
* feat: changed to template functions
* test: added 2 test cases for square_area()
* test: added 3rd test case
* [test/docs] added more test cases and docs for them
* docs: added @details
* updating DIRECTORY.md
* fix: changed from math.h to cmath
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: added algorithms to the math namespace
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: call functions from the math namespace for testing
* fix: style indentation
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: style indentation
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: uses uint16_t instead of int for testing
* docs: added comments for testing variables
* fix: style guide
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>
* Add files via upload
# Class Based DSU
-Using Path Compression to get the best time complexity O(1)
-Using Union Rank to keep track of changes using parent(p) O(logN)
* Class based DSU : Path Compression O(1) and Union Rank O(logN)
* made changes to satisfy the meets of the PR
changes made to satisfy the needs of the PR
- used base lib instead of <bits/stdc++.h>
- changed all stdin's and included pre-declared test cases
* removed stdin for testing
* changed file name from upper case to lower case
* made necessary changes
* Delete DSU_union_rank.cpp
* Delete DSU_path_compresssion.cpp
* added explicit to contructors, return 0, n=dec
* Delete dsu_path_compresssion.cpp
* added documentations, to match the typical structure
Added @brief @details @author @param @returns
* Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* added self-implementation test cases, changed int to uint64_t
* std::cout after assert
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for b8c37d09
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* documentation changes
* Update dsu_union_rank.cpp
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* clang-format and clang-tidy fixes for 18843179
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_path_compression.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* clang-format and clang-tidy fixes for 5c24d9a9
* Update data_structures/dsu_union_rank.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>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
Co-authored-by: Ayaan Khan <ayaankhan98@gmail.com>
* Create reverse_binary_tree.cpp
* Added documentation
Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT
* Added documentation
* Renamed tests to test
* Fixed issue with incorrect using statement
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for fb86292d
* Added Test cases
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Changed int to int64_t
* Updated documentation wording
* Reused code from union_of_two_arrays and modified for intersection
* Fixed bug and corrected test output
* Renamed file to better meet filename guidelines
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for e653f77a
* Changed integer type from int64_t to int32_t
* Added reference to similar union_of_two_arrays file
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
* feat: added a1z26 cipher
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for 6e5b6be0
* Update ciphers/a1z26_cipher.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* clang-format and clang-tidy fixes for 36edde81
* fix: brace style
Co-authored-by: David Leal <halfpacho@gmail.com>
* [feat/fix]: uses uint8_t for maps instead of int
* clang-format and clang-tidy fixes for ef211d41
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* Create reverse_binary_tree.cpp
* Added documentation
Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT
* Added documentation
* Renamed tests to test
* Fixed issue with incorrect using statement
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for fb86292d
* Added Test cases
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Changed int to int64_t
* Updated documentation wording
* Added namespace and print function
Added the operations_on_datastructures namespace and created a function to print a vector.
* Added implementation of union for two arrays
* Fixed bug with initialization of indexes and added test case
* Added test cases
* Modified references to const &
* Renamed file to meet filename guidelines better
* updating DIRECTORY.md
* Update operations_on_datastructures/union_of_two_arrays.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/union_of_two_arrays.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/union_of_two_arrays.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Made changes to documentation
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* Create reverse_binary_tree.cpp
* Added documentation
Added Documentation for the level_order_traversal() function, and implemented a print() function to display the tree to STDOUT
* Added documentation
* Renamed tests to test
* Fixed issue with incorrect using statement
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for fb86292d
* Added Test cases
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update operations_on_datastructures/reverse_binary_tree.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Changed int to int64_t
* Updated documentation wording
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: add atbash_cipher
* [test/fix]: test case expected result
* docs: added comments for main and test function
* doc: changed brief for test function
Co-authored-by: David Leal <halfpacho@gmail.com>
* updating DIRECTORY.md
* doc: fixed test comment
Co-authored-by: David Leal <halfpacho@gmail.com>
* [feat/fix]: made test function static
Co-authored-by: David Leal <halfpacho@gmail.com>
* doc: added author comment
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: brace style
Co-authored-by: David Leal <halfpacho@gmail.com>
* doc: modified file description and added comments for test function
* doc: added comment for #include <iostream>
Co-authored-by: David Leal <halfpacho@gmail.com>
* doc: added description of the algorithm
* Update ciphers/atbash_cipher.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update ciphers/atbash_cipher.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update ciphers/atbash_cipher.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update ciphers/atbash_cipher.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* feat: Add monte carlo integration
* test: Add tests for monte carlo integration
* docs: Add documentation for monte carlo integration
* updating DIRECTORY.md
* fix: Add _USE_MATH_DEFINES for windows
* fix: Comment spacing
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>
* FCFS scheduling algorithm in operating system
Added C++ implementation of FCFS scheduling algorithm in a new directory Operating-System/Scheduing-Algorithms
* Renamed files and directories to match guidelines
* Updated comments
* Added comments for member variables of FCFS class
* Deleted .vscode directory
* Replaced array of tuples with vector of tuples
Replaced formatted printf with cout and iomanip flags
Removed unused code blocks
* Replaced array of tuples with vector of tuples
* Removed nested directory
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for c95495b4
* clang-format and clang-tidy fixes for 732f247d
* Updated the documentation and used unsigned int for non-negative integers
* clang-format and clang-tidy fixes for 295f0cc6
* clang-format and clang-tidy fixes for 31f05910
* Added test cases using random number generator
* Replaced time(0) with time(nullptr)
* clang-format and clang-tidy fixes for 40d663d3
* Fixed documentation
* Rearranged code
* clang-format and clang-tidy fixes for b40a2801
* clang-format and clang-tidy fixes for 243dcc15
* Updated documentation
* clang-format and clang-tidy fixes for 899ff7ea
* Fixed some typos
* Apply suggestions from code review
* Apply suggestions from code review
* Apply suggestions from code review
* Replaced int with uint32_t in lines 259 and 263
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: kadane's algorithm added
* file renamed to kadanes3.cpp and clang-tidy warnings fixed
* updating DIRECTORY.md
* DIRECTORY.md and kadanes3.cpp modified
* change integer types to int64_t and uint64_t, as per the requirements.
* clang-format and clang-tidy fixes for 5025b93a
* Apply suggestions from code review
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: add geometric distribution
* test: Add test for geometric dist
* fix: Make range_tries inclusive
* docs: Add documentation for geometric distribution
* fix: clang warnings in geometric_dist
* updating DIRECTORY.md
* fix: Remove extra line
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Remove file name
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Add return value of void function
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Add comment for test function
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Update successful test message
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Add geometric_dist namespace
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Remove extra line
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Close comment
* docs: Fix documentation
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Add const to parameter
Co-authored-by: David Leal <halfpacho@gmail.com>
* fix: Make class methods const
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* feat: added z_algorithm in strings
* Updated z_function.cpp
Updated z_function.cpp as per contribution guidelines.
Fixed Link using github markdown syntax
Created a separate function for tests and covered the corner case
* Apply suggestions from code review
More comments added to the code
Co-authored-by: David Leal <halfpacho@gmail.com>
* Apply suggestions from code review
Some more documentation added as per contribution guidelines.
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update strings/z_function.cpp
comments added
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update strings/z_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for 0c7515e9
* Updated int -> uint64_t
Updated int -> uint64_t for non-negative values
* clang-format and clang-tidy fixes for 12d51239
* Update strings/z_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update strings/z_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* More comments added
* clang-format and clang-tidy fixes for 8a627ac9
* Update strings/z_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
* Update strings/z_function.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Finding no. of digits in a Number
* Initialize n
* Initialize n as int
* Changes done
* Changes done with codes by adding more comments
* Changes done with codes by adding name as md
* Modified comments
* add void
* remove void & update comments
* Set some changes to pass Awesome CI Workflow
* add return 0 & file name in lower case
* Changes done..
* Update finding_number_of_Digits_in_a_Number.cpp
* Update finding_number_of_Digits_in_a_Number.cpp
* Update finding_number_of_Digits_in_a_Number.cpp
* formatting filenames 0ec45e33
* updating DIRECTORY.md
* clang-format and clang-tidy fixes for 0ec45e33
* clang-format and clang-tidy fixes for 9c0a437e
* updating DIRECTORY.md
* Wrote test, needs review
* [fix/docs]: Fix tests/code and add documentation
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>