# 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 numbers N and M, the task is to find the minimum number of moves to change N to M or -1 if it’sâ€¦ 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
Given three integers N, L, and R, the task is to print the total count of ways to form a necklace of at most Nâ€¦ Read More