Posts from C++

C++ program to change the time format from 12 hours to 24 hours

By Gagana Gonchikar N

In this tutorial, we will learn how to change the time format from 12 hours to 24 hours in C++ programming. In this program, the user needs to enter the input in the 12 hours forma.... Read More

C++ program to remove the last two characters from a string

By Gagana Gonchikar N

In this tutorial, we’ll learn how to remove last two characters from the string in C++. In this program we’ll take string as an input from the user and the removed last.... Read More

Concept of Bit Manipulation using C++

By Himanshu Raj

Bit Manipulation is a very effective technique that is used to solve problems in optimized way. This technique is useful for competitive programming perspective. Bit Manipulation i.... Read More

Add 1 to a number represented as linked list in C++

By Himanshu Raj

In this post, we will learn how to add 1 to a number represented as linked list in C++. For example 4959 is represented as (4-> 9-> 5 -> 9->9) and adding 1 to it should.... Read More

How to sort an array using recursion in C++

By Himanshu Raj

In this post, we will learn how to sort an array using recursion in C++ programming. An array is a continuous memory block in which elements can be extracted sequentially. for exam.... Read More

How to find K-th symbol in Grammar using C++

By Himanshu Raj

In the problem, we build a table of n rows (1-indexed). We start by using writing zero within the 1st row. Now in every subsequent row, we observe the preceding row and replace eac.... Read More

Distribute Minimum Candies Using Greedy Algorithm in C++

By Sakshi Singh

Consider a given array with N integers, where each element represents the ratings of N children standing in a line. We have to distribute minimum candies in C++ with the greedy alg.... Read More

C++ program to find Kth permutation Sequence

By Sakshi Singh

Consider two given integers N and K, We have to find the Kth permutation sequence from integer 1 to N using C++. For example, Suppose N=3 and K=4, Now, the order list of permutatio.... Read More