fix: add <cstdint> to graph/**

This commit is contained in:
realstealthninja
2024-08-31 11:26:48 +05:30
parent b752f55fa1
commit 549aad5ce6
5 changed files with 16 additions and 7 deletions

View File

@@ -14,6 +14,7 @@
*/
#include <cassert> /// for assert
#include <cstdint> /// for integral typedefs
#include <iostream> /// for io operations
#include <limits> /// for variable INF
#include <queue> /// for the priority_queue of distances

View File

@@ -3,20 +3,24 @@
* @brief [Disjoint union](https://en.wikipedia.org/wiki/Disjoint_union)
*
* @details
* The Disjoint union is the technique to find connected component in graph efficiently.
* The Disjoint union is the technique to find connected component in graph
* efficiently.
*
* ### Algorithm
* In Graph, if you have to find out the number of connected components, there are 2 options
* In Graph, if you have to find out the number of connected components, there
* are 2 options
* 1. Depth first search
* 2. Disjoint union
* 1st option is inefficient, Disjoint union is the most optimal way to find this.
* 1st option is inefficient, Disjoint union is the most optimal way to find
* this.
*
* @author Unknown author
* @author [Sagar Pandya](https://github.com/sagarpandyansit)
*/
#include <iostream> /// for IO operations
#include <set> /// for std::set
#include <vector> /// for std::vector
#include <cstdint> /// for integer typedefs
#include <iostream> /// for IO operations
#include <set> /// for std::set
#include <vector> /// for std::vector
/**
* @namespace graph
@@ -25,7 +29,8 @@
namespace graph {
/**
* @namespace disjoint_union
* @brief Functions for [Disjoint union](https://en.wikipedia.org/wiki/Disjoint_union) implementation
* @brief Functions for [Disjoint
* union](https://en.wikipedia.org/wiki/Disjoint_union) implementation
*/
namespace disjoint_union {
uint32_t number_of_nodes = 0; // denotes number of nodes

View File

@@ -7,6 +7,7 @@
*
*/
#include <cstdint> /// for integral typedefs
#include <iostream> // for std::cout
#include <map> // for std::map
#include <queue> // for std::queue

View File

@@ -15,6 +15,7 @@
* @author [tushar2407](https://github.com/tushar2407)
*/
#include <cassert> /// for assert
#include <cstdint> /// for integral typedefs
#include <iostream> /// for IO operations
#include <queue> /// for queue data structure
#include <vector> /// for vector data structure

View File

@@ -19,6 +19,7 @@
#include <algorithm> /// for std::min
#include <cassert> /// for assert
#include <cstdint> /// for integral typedefs
#include <iostream> /// for IO operations
#include <limits> /// for limits of integral types
#include <vector> /// for std::vector