Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
for IO operations More...
Namespaces | |
namespace | treap |
Functions for the Treap algorithm implementation. | |
Classes | |
class | Bitset |
Simple bitset implementation for bloom filter. More... | |
class | BloomFilter |
Bloom filter template class. More... | |
struct | Node |
class | SegmentTree |
class representation of the segment tree More... | |
class | SkipList |
class | Stack |
Class representation of a stack. More... | |
class | trie |
Trie implementation for small-case English alphabets a-z More... | |
Functions | |
static std::size_t | hashDJB2 (std::string const &s) |
Function djb2 to get hash for the given string. | |
static std::size_t | hashStr (std::string const &s) |
Hash function, to get hash for the given string. | |
std::size_t | hashInt_1 (int x) |
Hash function for test | |
std::size_t | hashInt_2 (int x) |
Hash function for test | |
Variables | |
constexpr int | MAX_LEVEL = 2 |
Maximum level of skip list. | |
constexpr float | PROBABILITY = 0.5 |
Current probability for "coin toss". | |
for IO operations
for std::vector
For IO operations.
Stack Data Structure Using the Queue Data Structure.
For std::out_of_range.
Data-structure algorithms.
For assert.
for managing dynamic storage
Algorithms with data structures.
for assert
Data Structures algorithms.
for assert for list of hash functions for bloom filter constructor for initializer_list for bloom filter constructor for testing on strings for std::vector
Data Structures algorithms
for io operations for std::array
Algorithms with data structures
for assert for I/O operations
Data Structures algorithms
For IO operations For std::vector For std::min and std::max
for std::array for assert
Data Structures algorithms
For std::assert For std::cout For std::unique_ptr
Using 2 Queues inside the Stack class, we can easily implement Stack data structure with heavy computation in push function.
References used: StudyTonight
Data structures algorithms
For array For assert
Data Structures
for std::array for assert for std::ofstream for std::cout for std::unique_ptr for std::queue for std::to_string
for assert for IO operations for std::shared_ptr for std::stack for std::unordered_map
Data structures algorithms
|
static |
Function djb2 to get hash for the given string.
s | string to get hash from |
std::size_t data_structures::hashInt_1 | ( | int | x | ) |
x | to get hash from |
x
parameter std::size_t data_structures::hashInt_2 | ( | int | x | ) |
x | to get hash from |
x
parameter
|
static |
Hash function, to get hash for the given string.
s | string to get hash from |