Ayush Gupta has Published 530 Articles

Count all 0s which are blocked by 1s in binary matrix in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:38:38

270 Views

In this tutorial, we will be discussing a program to find the count of 0s which are blocked by 1s in a binary matrix.For this we will be provided with a binary matrix. Our task is to find and count all the 0s in the matrix that are blocked by ... Read More

Count 1’s in a sorted binary array in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:32:28

149 Views

In this tutorial, we will be discussing a program to find the 1’s in a sorted binary array.For this we will be provided with an array containing only 1 and 0. Our task is to count the number of 1’s present in the array.Example Live Demo#include using namespace std; //returning ... Read More

Count ‘d’ digit positive integers with 0 as a digit in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:29:56

147 Views

In this tutorial, we will be discussing a program to find the numbers having ‘d’ digits with 0 as a digit.For this we will be provided with a number ‘d’. Our task is to count and print the number of positive integers having ‘d’ digits and 0 as one of ... Read More

Cost to make a string Panagram in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:27:08

156 Views

In this tutorial, we will be discussing a program to find the cost of making a string panagram.For this we will be provided with an array of integers. Our task is to convert the given string into a panagram and calculate the cost of doing that with the help of ... Read More

Cost to Balance the parentheses in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:23:37

125 Views

In this tutorial, we will be discussing a program to find the cost to balance the parentheses.For this we will be provided with a sequence of brackets. Our task is to balance those parentheses in the equation by shifting their position by one and print -1 if balancing them isn’t ... Read More

Cost of painting n * m grid in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:17:06

184 Views

In this tutorial, we will be discussing a program to find the cost of painting n*m grid.For this we will be provided with two integers n and m. Our task is to calculate the minimum cost of painting a n*m grid is the cost of painting a cell is equal ... Read More

Correct the Random Pointer in Doubly Linked List in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:14:03

168 Views

In this tutorial, we will be discussing a program to correct the random pointer in a doubly linked list.For this we will be provided with a doubly linked list with one node having a random pointer. Our task is to rectify the element to whom the pointer should be pointing ... Read More

Converting one string to other using append and delete last operations in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:49:47

134 Views

In this tutorial, we will be discussing a program to convert one string to other using append and delete last operations.For this we will be provided with two strings. Our task is to calculate whether the first string can be converted into the second one by performing k operations of ... Read More

Converting Decimal Number lying between 1 to 3999 to Roman Numerals in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:45:23

408 Views

In this tutorial, we will be discussing a program to convert decimal number lying between 1 to 3999 to roman numerals.For this we will be provided with a random integer. Our task is to convert the given number into its roman numeral equivalent.Example Live Demo#include using namespace std; //converting decimal ... Read More

Convert to number with digits as 3 and 8 only in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:44:12

78 Views

In this tutorial, we will be discussing a program to convert a number to have digits as 3 and 8 only.For this we will be provided with a random number. Our task is to convert its digits to be only 3 and 8 by either adding/subtracting 1 from the number ... Read More

Advertisements