Skip to content

Category Archives: Combinatorial

Given an integer N, the task is to find the minimum steps to visit all integers in the range [1, N] by selecting any integer… Read More
Given a string S consisting of N digits, the task is to find the number of distinct Prime Numbers that can be formed using the… Read More
Given an integer array arr[]. Create a new array which is a rotation of given array and find the maximum Hamming distance between both the… Read More
Given two matrices sudoku[][] and region[][] of size N * N, the task is to fill the given Sudoku on the basis of the given… Read More
Given two integers N and M where N is the number of boxes placed in a row and M is the number of colours of… Read More
Given two positive integers N and M representing the count of distinct digits and alphabets respectively in a string, the task to count the number… Read More
Given the current position of a Knight as (i, j), find the count of different possible positions visited by a knight after N moves (in… Read More
Given an array, arr[] of size N and an integer K, the task is to find the number of ways of selecting K array elements,… Read More
Given two binary strings S1 and S2 of size N and M respectively such that the string S2 also contains the character ‘?’, the task… Read More
Given two positive integers R and B representing R red and B blue beans and an integer D, the task is to check whether it… Read More
Given a string S consisting of N characters and an array M[] of pairs of characters such that any character M[i][0] can be replaced with… Read More
Given two arrays L[] and R[] of size N, and an integer K, the task is to find the number of ways to select exact… Read More
Given an array arr[] consisting of N positive integers and a positive integer X, the task is to find the number of pairs (i, j)… Read More

Start Your Coding Journey Now!