Commit Graph

1733 Commits

Author SHA1 Message Date
realstealthninja
dabd6d2591 chore: use iwyu on graph/**.cpp 2024-09-13 15:38:23 +05:30
realstealthninja
740bd65932 chore: use iwyu on geometry/**.cpp 2024-09-13 15:38:11 +05:30
realstealthninja
16ee49e086 chore: use iwyu on divide_and_conquer/**.cpp 2024-09-13 15:38:00 +05:30
realstealthninja
a3b719e368 chore: use iwyu on data_structures/**.cpp 2024-09-13 15:37:49 +05:30
realstealthninja
24e597f7e2 chore: use iwyu on cpu_scheduling_algorithms/**.cpp 2024-09-13 15:37:34 +05:30
realstealthninja
3d80295883 chore: use iwyu on ciphers/**.cpp 2024-09-13 15:37:16 +05:30
realstealthninja
7edcb6e458 chore: use iwyu on bit_manip/**.cpp 2024-09-13 15:37:06 +05:30
realstealthninja
f0a30d7cdb chore: use iwyu on backtracking/**.cpp 2024-09-13 15:36:54 +05:30
realstealthninja
55f3d1d4e9 Merge branch 'master' into cstdint 2024-09-05 06:11:31 +05:30
Piotr Idzik
15e3fed924 style: add missing const in bloom_filter.cpp (#2724)
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2024-09-05 05:24:16 +05:30
realstealthninja
11c5fde6d8 Merge branch 'master' into cstdint 2024-09-05 05:16:54 +05:30
Sebastian Skonieczny
ef209dfab3 Added Iterative Quick Sort (#2684)
* feat: Added iterative quick sort using stack

* fix: Forgot to add @param for sort function

* Update sorting/quick_sort_iterative.cpp

* Update sorting/quick_sort_iterative.cpp

* Update sorting/quick_sort_iterative.cpp

* style: space b/w for and comment

* Update sorting/quick_sort_iterative.cpp

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

* Update sorting/quick_sort_iterative.cpp

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

* fixed namespace error

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2024-09-05 05:14:41 +05:30
realstealthninja
f063687892 fix: make tests static
Co-authored-by: David Leal <halfpacho@gmail.com>
2024-09-05 05:13:16 +05:30
realstealthninja
fad74e89dc fix: make tests static
Co-authored-by: David Leal <halfpacho@gmail.com>
2024-09-05 05:13:01 +05:30
David Leal
d1b45668cb Merge branch 'master' into cstdint 2024-09-04 11:43:45 -06:00
Piotr Idzik
490974eeb3 fix: memory leak in median_search2.cpp (#2723) 2024-09-04 05:31:30 +05:30
realstealthninja
a147054351 Merge branch 'master' into cstdint 2024-09-04 05:21:59 +05:30
Piotr Idzik
c652c4f237 fix: stack buffer underflow in tim_sort.cpp (#2722) 2024-09-03 17:14:49 +05:30
realstealthninja
56d17d9eb9 Merge branch 'master' into cstdint 2024-09-02 18:14:22 +05:30
Piotr Idzik
b6108e494d fix: remove memory leak from recursive_tree_traversal.cpp (#2721) 2024-09-02 18:12:26 +05:30
realstealthninja
e6bafa697e Merge branch 'master' into cstdint 2024-09-02 06:27:55 +05:30
Maxim Smolskiy
db182d5521 fix: fix bug in timSort (#2692)
* fix: fix bug in timSort

* Apply suggestions from code review

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

* Fix

* Update sorting/tim_sort.cpp

* Add const

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2024-09-02 04:42:33 +05:30
Piotr Idzik
52db277fb6 fix: remove memory leak from iterative_tree_traversals.cpp (#2720) 2024-09-02 04:33:19 +05:30
SOZEL
54a20b447e Rework on Stack Array Data Structure (#2683)
* ref: rework on stack array data structure
- The `Stack` class is placed within the `data_structures` namespace
- The destructor is added to the Stack class to ensure memory deallocation
- Comments are added to the member functions to describe their purpose
- The self-test function is provided, which demonstrates the usage of the Stack class

* chore(docs): add `namespace` docstring

* chore: add `std::out_of_range` exception and test cases when stack is empty

* ref: add `full` and `empty` methods

* ref: improve stack array implementation
- Use TOS instead of stack index
- Add tests for overflow and underflow

* fix: remove comparision to true from asserts

* chore: remove `stack.hpp`

* fix: revert

* Update data_structures/stack_using_array.cpp

* docs: add namespace comment

* chore: remove redundant line in docstring of `empty` method

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2024-09-01 10:07:27 +05:30
github-actions[bot]
fe41cf4d11 docs: update DIRECTORY.md (#2718)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2024-09-01 09:54:27 +05:30
Yancey
502a953e23 feat: let KMP algorithm return index (#2713)
* fix: KMP algorithm (#2712)

* feat: let the KMP algorithm return index and add more tests.

* feat: format code

* Update strings/knuth_morris_pratt.cpp

* update knuth_morris_pratt.cpp

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2024-09-01 09:47:49 +05:30
realstealthninja
3aa689c9b7 Merge branch 'master' into cstdint 2024-08-31 15:10:04 +05:30
SOZEL
9702903a12 Implement Trapped RainWater (#2716)
* chore: add `trapped_rainwater.cpp` to DIRECTORY.md

* feat: implement Trapped Rain Water algorithm

* chore: add links to the trapped rain water problem

* chore(docs): remove Trapped Rain Water dir

* ref: add edges tests

* doc: adding Sozel as author

* doc: includes documentatino

* ref: use `unsigned int` for height of walls

* fix: use fixed-width integers instead of unsigned int

* chore: rearrange included libraries

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
2024-08-31 15:08:24 +05:30
realstealthninja
52b2afeb86 doc: remove include statement from comment 2024-08-31 11:36:30 +05:30
realstealthninja
ba64b3c9fc fix: add <cstdint> to string/** 2024-08-31 11:33:58 +05:30
realstealthninja
4707b729cc fix: add <cstdint> to sorting/** 2024-08-31 11:33:58 +05:30
realstealthninja
52ff5e8c92 fix: add <cstdint> to search/** 2024-08-31 11:33:58 +05:30
realstealthninja
6357548464 fix: add <cstdint> to other/** 2024-08-31 11:33:58 +05:30
realstealthninja
8740df0314 fix: add <cstdint> to numerical_methods/** 2024-08-31 11:33:58 +05:30
realstealthninja
afd4ccbc5e fix: add <cstdint> to math/** 2024-08-31 11:33:58 +05:30
realstealthninja
2ec9d7fe49 fix: add integral typdefs to hashing/** 2024-08-31 11:33:58 +05:30
realstealthninja
549aad5ce6 fix: add <cstdint> to graph/** 2024-08-31 11:33:58 +05:30
realstealthninja
b752f55fa1 fix: add <cstdint> to graham_scan_functions.hpp 2024-08-31 11:18:32 +05:30
realstealthninja
5421cfcdeb fix: add <cstdint> to treap.cpp 2024-08-31 11:18:06 +05:30
realstealthninja
82cb276f44 fix: add <cstdint> to stack_using_list_queue.cpp 2024-08-31 11:17:50 +05:30
realstealthninja
0d184428e1 fix: add <cstdint> to sparse_table.cpp 2024-08-31 11:17:36 +05:30
realstealthninja
b8e5592215 fix add <cstdint> to datastructures/queue_using_array.cpp 2024-08-31 11:17:03 +05:30
realstealthninja
ef59b45129 fix add <cstdint> to datastructures/list_array>cpp 2024-08-31 11:16:07 +05:30
realstealthninja
11d2437158 fix: add <cstdint> to data_structures/dsu_path_compression.cpp 2024-08-31 11:14:22 +05:30
realstealthninja
4792c814bf fix: add <cstdint> to data_structures/dsu_path_compression.cpp 2024-08-31 11:13:53 +05:30
realstealthninja
1a0b5cf7f1 fix: add <cstdint> to ciphers/uint128_t.hpp 2024-08-31 11:12:39 +05:30
realstealthninja
89dfe607d0 fix: add <cstdint> to ciphers/hill_cipher.cpp 2024-08-31 11:12:01 +05:30
realstealthninja
84c2957f09 fix: add <cstdint> to ciphers/base64_encoding.cpp 2024-08-31 11:11:07 +05:30
realstealthninja
4b16caa985 fix: add <cstdint> to bit_manipulation/travelling_salesman_using_bit_manipulation.cpp 2024-08-31 11:10:34 +05:30
realstealthninja
49fbaf6285 fix: add <cstdint> to bit_manipulation/set_kth_bit.cpp 2024-08-31 11:09:00 +05:30