Queue Implementation using Templates in C++
This article will provide C++ implementation of a queue data structure using templates in C++. This article will make the class code generic by using C++ templates to support all data types.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedThis article will provide C++ implementation of a queue data structure using templates in C++. This article will make the class code generic by using C++ templates to support all data types.
This article covers queue implementation in C++. A queue is a linear data structure that serves as a container of objects that are inserted and removed according to the FIFO (First–In, First–Out) principle.
In this article, we will discuss the C++ implementation of the stack data structure using classes and make code generic for all data types by using C++ templates.
In this article, C++ implementation of stack data structure is discussed using a class. A stack is a linear data structure that serves as a container of objects that are inserted and removed according to the LIFO (Last–In, First–Out) rule.
Heapsort is an in-place, comparison-based sorting algorithm and can be thought of as an improved selection sort as it divides the input into a sorted and an unsorted region.
In previous post, we have introduced the heap data structure and covered heapify-up, push, heapify-down and pop operations. This article covers C++ implementation of Priority Queue Data Structure (Max Heap and Min heap).
Given an undirected or a directed graph, implement the graph data structure in C++ without using STL. Implement for both weighted and unweighted graphs using the adjacency list representation.
Given an undirected or a directed graph, implement a graph data structure in C++ using STL. Implement for both weighted and unweighted graphs using the adjacency list representation of the graph.
This post will discuss how to search for a given target value in a sorted array of integers using binary search implementation provided by the C++ standard library (STL) and Java Collection framework.
All algorithms can be classified into in-place and out-of-place algorithms based on the amount of extra space used by them. In this quick article, we’ll explore the difference between the two.
Write an iterative program to reverse a string in C++ and Java.
Write a C/C++ program without using the main() function. We are allowed to change the entry point of the program from main() to any other function or remove the main() function altogether.