'Is there any header file in c or c++ to implement data structures like graph,trees etc?

Is there any header file in c or c++ to implement data structure like graph,trees,stack etc?



Solution 1:[1]

C++ has <stack>, and some uses of trees like maps, sets, and heaps.

See Boost.Graph for more C++ graph support.

You have worse support for data structures in C (essentially none in standard C), but you could try GLib.

Solution 2:[2]

In standard C, no.

In C++, you have std::stack for, well, stack. #include <stack>

Solution 3:[3]

In C++ you have STL(Standard Template Library) which has vector,queue,maps etc.

You can also use BOOST which has much more robust data structures

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pubby
Solution 2 Luchian Grigore
Solution 3 Jeeva