* 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>
* 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>
* fix: set proper size of fac
* style: use std::size_t as a type of loop counter
* style: use uint64_t as a type of loop counter
* fix: remove p from the argument list of NCRModuloP::ncr
* refactor: add utils namespace
* refactor: use references in gcdExtended
* refactor: add NCRModuloP::computeFactorialsMod
* style: make NCRModuloP::ncr const
* test: reorganize tests
* test: add missing test cases
* refactor: simplify logic
* style: make example object const
* style: use auto
* style: use int64_t to avoid narrowing conversions
* docs: update explanation why to import iostream
* docs: remove `p` from docstr of `NCRModuloP::ncr`
* docs: udpate doc-strs and add example()
* Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
* dosc: add missing docs
* feat: display message when all tests pass
Co-authored-by: David Leal <halfpacho@gmail.com>
* style: initialize `NCRModuloP::p` with `0`
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>