Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
for std::vector More...
Namespaces | |
namespace | dijkstra |
Functions for the Dijkstra algorithm implementation. | |
Functions | |
bool | can_jump (const std::vector< int > &nums) |
Checks whether the given element (default is 1 ) can jump to the last index. | |
template<typename T > | |
void | findMinimumEdge (const int &infinity, const std::array< std::array< T, 6 >, 6 > &graph) |
Finds the minimum edge of the given graph. | |
for std::vector
for IO operations
for assert for INT_MAX for IO operations
Greedy Algorithms
for assert for std::cout
Greedy Algorithms
for array
Greedy Algorithms
bool greedy_algorithms::can_jump | ( | const std::vector< int > & | nums | ) |
Checks whether the given element (default is 1
) can jump to the last index.
nums | array of numbers containing the maximum jump (in steps) from that index |
void greedy_algorithms::findMinimumEdge | ( | const int & | infinity, |
const std::array< std::array< T, 6 >, 6 > & | graph ) |
Finds the minimum edge of the given graph.
infinity | Defines the infinity of the graph |
graph | The graph that will be used to find the edge |