Posts from C++

Program for Dijkstra’s Algorithm for Adjacency List Representation in C++

By Nimish Dham

In this tutorial, we will learn a program for Dijkstra’s Algorithm for Adjacency List Representation in C++. Dijkstra’s Algorithm Dijkstra’s Algorithm is a greedy sea.... Read More

std::transform() in C++

By Vishal Patil

Hello everyone, in this tutorial we learn about the std::transform() function available in C++. The transform function is defined under the algorithm header file. The transform fun.... Read More

C++ program to swap all odd and even bits

By Sonal Bera

In this tutorial, we try to find a way by which we can swap all the odd and even bits. Say we have a number 76, we swap it at the bit level and convert it into 140. What we do is t.... Read More

Find shortest path with exactly k edges in a directed and weighted graph in C++

By Nimish Dham

Given a directed and weighted graph, we have to find the shortest path between two vertices that have exactly k edges. In a directed graph, an edge only exists in one direction, i..... Read More

Number of unique BSTs with n nodes in C++

By Nimish Dham

A BST(Binary Search Tree) is a kind of binary tree wherein the left subtree of a node contains nodes with values less than that of the node and the right subtree of the node contai.... Read More

Reverse a stack without using extra space in O(n) in C++

By Nimish Dham

Reversing a stack made using the stack library from STL in C++ without using extra space isn’t possible as we will have to store the stack elements in some auxiliary space as.... Read More

Check if usage of capitals is correct in a word in C++

By yaswanth vakkala

In this article, let’s learn how to check if the usage of capitals is correct in the given word with the help of C++ programming. We can say capitals are used correctly when .... Read More

Convert double number to 3 decimal places number in C++

By Nimish Dham

In this tutorial, we’ll be going over two methods of converting a double with any number of decimal places to a double with decimal places. The first method is arithmetic and.... Read More

Related Posts