Ayush Gupta has Published 530 Articles

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

Ayush Gupta

Ayush Gupta

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

175 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

207 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

Count all pairs with given XOR in C++

Ayush Gupta

Ayush Gupta

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

241 Views

In this tutorial, we will be discussing a program to find the number of pairs with the given XOR.For this we will be provided with an array and a value. Our task is to find the number of pairs whose XOR is equal to the given value.Example#include using namespace std; ... Read More

Count all pairs of an array which differ in K bits in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 10:55:19

175 Views

In this tutorial, we will be discussing a program to find the number of pairs of an array which differ in K bits.For this we will be provided with an array and an integer K. Our task is to find the number of pairs who differ by K bits in ... Read More

Count all pairs of adjacent nodes whose XOR is an odd number in C++

Ayush Gupta

Ayush Gupta

Updated on 10-Feb-2020 10:50:15

127 Views

In this tutorial, we will be discussing a program to find the number of pairs of adjacent nodes whose XOR is an odd number.For this we will be provided with a binary tree. Our task is to count the number of pairs of adjacent elements whose XOR is an odd ... Read More

Count numbers from 1 to n that have 4 as a digit in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:57:50

425 Views

In this tutorial, we will be discussing a program to find the numbers from 1 to n that have 4 as a digit.For this we will be provided with a number n. Our task is to count all the numbers which have 4 as one of their digits and print ... Read More

Count number of even and odd elements in an array in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:53:52

694 Views

In this tutorial, we will be discussing a program to find the number of even and odd elements in an array.For this we will be provided with an array. Our task is to calculate the number of even and odd elements in the given array.Example Live Demo#include using namespace std; void ... Read More

Count all increasing subsequences in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:49:01

542 Views

In this tutorial, we will be discussing a program to find the number of increasing sequences.For this we will be provided with an array containing digits 0 to 9. Our task is to count all the sequences present in the array such that the next element is greater than the ... Read More

Count all elements in the array which appears at least K times after their first occurrence in C++

Ayush Gupta

Ayush Gupta

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

271 Views

In this tutorial, we will be discussing a program to find the number of elements in the array which appears at least K times after their first occurrence.For this we will be provided with an integer array and a value k. Our task is to count all the elements occurring ... Read More

Count all distinct pairs with difference equal to k in C++

Ayush Gupta

Ayush Gupta

Updated on 05-Feb-2020 07:41:45

201 Views

In this tutorial, we will be discussing a program to find the distinct pairs with difference equal to k.For this we will be provided with an integer array and the value k. Our task is to count all the distinct pairs that have the difference as k.Example Live Demo#include using namespace ... Read More

Advertisements