Here we are not gonna discuss the definitions of graph and its algorithm we are just going to visualise what graph is and different ways to store the graph.

What is a graph?

It is totally different from the one we see in mathematics. Basically it is a way to represent the relations between a set of entities. This set of entities are called nodes and the relation between any two entities are called edge.

Let us see an example to get the actual visualization of graph. Everyone uses Facebook. …

Here we are going to discuss about some STLs that are frequently used in competitive programming. Like string, vector, pair, queue, stack, set and map.

What is STL ?

STL (Standard Template Library): STL provides a set of common classes for C++, such as containers ( Queue , Stack ) and associative arrays ( Hash tables ) , that can be used with any built-in data-type and with any user-defined data-type that supports some elementary operations (such as copying and assignment).

All STLs provide dynamic memory allocation. Vector and string have contiguous memory allocation and the rest have non-contiguous memory allocation.

So now we should see each STL one by…


Amarnath Sharma

SDE Amazon| 6* Codechef

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store