Sunidhi Bansal has Published 1100 Articles

Count of cyclic permutations having XOR with other binary string as 0 in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:32:52

545 Views

We are given with two binary strings let's say str_1 and str_2 containing the combination of 1's and 0's and the task is to firstly form the set let's say “SET” of different permutations possible from the string str_1 and then we will perform XOR operations of the elements in ... Read More

Count of Numbers in a Range where digit d occurs exactly K times in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:31:34

231 Views

We are given with an integer range starting from a variable let's say start till the variable end and a variable k and d. The task is to calculate the count of digits d in a range such that d occurs exactly the k times.For ExampleInput - int start = 10, ... Read More

Count of Numbers in a Range divisible by m and having digit d in even positions in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:30:57

133 Views

We are given with an integer range, a variable m which is used as divisor and a variable d which is used to check whether the digit 'd' is at even position or not and the task is to calculate the count of those numbers in a range which are ... Read More

Count of Numbers in Range where the number does not contain more than K non zero digits in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:28:07

263 Views

We are given an integer range starting from the variable let's say start till the variable end and a variable k and the task is to calculate the count of numbers in the range such that the numbers don't have more than 'k' non-zero digits.For ExampleInput - int start = ... Read More

Count of strings that become equal to one of the two strings after one removal in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:26:59

422 Views

We are given with two different strings let's say s1 and s2 and the task is to form the string let's say S by combining the unique letters of s1 and s2 and now check whether after removing one character from the string S it is forming a string which ... Read More

Count pairs of non-overlapping palindromic sub-strings of the given string in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:26:27

308 Views

We are given an input as a string, the task is to find out the count of pairs of non-overlapping palindromic sub-strings of the given input string. The value of arr[i][j] is true if the substring is a palindrome, otherwise false. We will take combination out of the string and ... Read More

Count Occurrences of Anagrams in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:21:33

321 Views

We are given an input as a text stream and a word, and the task is to find out the count of occurrences of anagrams of the word in the given text stream. Anagrams are generated by rearranging letters from a word which ends up being a different word or ... Read More

Count Strictly Increasing Subarrays in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:19:05

366 Views

We are given an array containing integer elements and the task is to firstly calculate the subarray out of the given array and then check whether the elements in a subarray are in increasing order or not. If yes, then we will consider the subarray else it will be discarded.The ... Read More

Count numbers in a range having GCD of powers of prime factors equal to 1 in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:18:19

58 Views

Given two numbers start and end representing a range of positive integers. The goal is to find the count of all the numbers that lie in range [start, end] and have prime factorization such that all prime factors of that number have powers such that they have GCD as 1.If ... Read More

Count the number of nodes at given level in a tree using BFS in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 29-Jan-2021 08:15:57

958 Views

Given an undirected graph containing the nodes of a tree as vertices. The goal is to find the count of nodes at a given level of the tree using BFS( breadth first search ) algorithm.BFS Algorithm:-This algorithm starts traversing the graph/tree level by level. Starting from node at level 0, ... Read More

Advertisements