C++ Standard Template Library (STL) – [Pair and Tuple]

Pair in C++ STL is used to combine two values having different or same data types. It stores two different values as a single element. Tuple unlike pair can be used to combine two or more than two values having different or same data types.

C++ Standard Template Library (STL) – [Stack and Queue]

Stacks and queues are data structures that store elements of a specific data type. They have various operations (methods/functions) to input, output and manage the data. Stack implements a lastin, first-out (LIFO) policy on its elements. So, the element removed from the stack is always the most recently inserted one. On […]

C++ Standard Template Library (STL) – [Heap]

The Heap data structure is an array that can be viewed as a complete Binary Tree. Each node in the tree corresponds to an element of the array A[]. We already discussed Heap data structure in this – post. However in this post we would learn about, how to build min/max Heaps […]

C++ Standard Template Library (STL) – [Vector]

A vector is a data structure for maintaining a set of elements having a specific data type. Vectors can be considered as arrays having dynamic size. Just like arrays, vectors also store its elements in a contiguous storage locations. That is why, elements in a vector can be accessed using offsets […]

C++ Standard Template Library (STL) – [Linked List]

The C++ Standard Template Library (STL) is a powerful library of C++ template classes that provide general-purpose classes and functions. It has implementations of many popular and commonly used algorithms and data structures like vectors, linked-lists, queues, priority queues, and stacks. In this post we’ll learn about: linked-lists. Linked List To […]