Ayush Gupta has Published 541 Articles

How arrays are passed to functions in C/C++

Ayush Gupta

Ayush Gupta

Updated on 17-Feb-2020 10:09:38

72 Views

In this tutorial, we will be discussing a program to understand how arrays are passed to functions.In the case of C/C++, the arrays are passed to a function in the form of a pointer which provides the address to the very first element of the array.Example Live Demo#include //passing array ... Read More

Count all possible position that can be reached by Modified Knight in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 12:13:17

67 Views

In this tutorial, we will be discussing a program to find the number of possible positions that can be reached by Modified Knight.For this we will be provided with a 8*8 chessboard. Our task is to find the number of positions Modified Knight can capture with the given number of ... Read More

Count all possible paths from top left to bottom right of a mXn matrix in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 12:08:04

165 Views

In this tutorial, we will be discussing a program to find the number of possible paths from top left to bottom right of a mXn matrix.For this we will be provided with a mXn matrix. Our task is to find all the possible paths from top left to bottom right ... Read More

Count all possible paths between two vertices in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 12:06:13

298 Views

In this tutorial, we will be discussing a program to find the number of paths between two vertices.For this we will be provided with a directed graph. Our task is to find the number of paths possible between two given vertices.Example#include using namespace std; //constructing a directed graph class Graph{ ... Read More

Count all possible N digit numbers that satisfy the given condition in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 12:02:03

111 Views

In this tutorial, we will be discussing a program to find the number of possible N digit numbers that satisfy the given condition.For this we will be provided with an integer. Our task is to check which one of number having N digits followNumber + Reverse(Number) = 10N -1Example#include ... Read More

Count all possible groups of size 2 or 3 that have sum as multiple of 3 in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 11:59:37

179 Views

In this tutorial, we will be discussing a program to find the number of possible groups of size 2 or 3 that have sum as multiple of 3.In this tutorial, we will be discussing a program to find the number of possible groups of size 2 or 3 that have ... Read More

Count all perfect divisors of a number in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 11:44:32

187 Views

In this tutorial, we will be discussing a program to find the number of all perfect divisors of a number.For this we will be provided with a number. Our task is to count all the perfect divisors of that given number.Example#include using namespace std; //checking perfect square bool if_psquare(int n){ ... Read More

Count all Palindromic Subsequence in a given String in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 11:24:43

157 Views

In this tutorial, we will be discussing a program to find the number of all palindromic subsequences in a given string.For this we will be provided with a string. Our task is to find the number of palindromic subsequences that can be made in that given string.Example#include #include using namespace ... Read More

Count all palindrome which is square of a palindrome in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 11:20:53

128 Views

In this tutorial, we will be discussing a program to find the number of palindromes which are squares of a palindrome.For this we will be provided with two values L and R. Our task is to find the number of super palindromes in the given range. A super palindrome is ... Read More

Count all Palindrome Sub-Strings in a String in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 11:13:53

160 Views

In this tutorial, we will be discussing a program to find the number of palindrome sub strings in a string.For this we will be given a string. Our task is to count the number of palindrome sub strings in the given string with length greater than 3.Example#include using namespace std; ... Read More

Advertisements