You are provided with an array of size 8*N and you are provided a permutation of 8*N consecutive integers comprising of all the elements from ‘a’ to ‘a + 7*N ‘. Your Read more →
Combinatorial
8 postsGiven an array with all distinct elements, you need to find the occurrence of every element among all the possible subarrays of the array. Examples: Input: arr[] = { 2 , 1 Read more →
Given two numbers n and m, generate all distinct subsequences of length m using numbers from 1 to n. You may repeat a number. INPUT: n=5, groups=3 OUTPUT: 1,1,3 1,2,2 1,3,1 2,1,2 Read more →
In this article, we will discuss about Hexahectagon number. According to definition of Hexahectagon number: A Hexahectagon number is class of figurate number. It has 600 – sided polygon called Hexahectagon. The Read more →
Given an integer array arr[] and an integer K (greater than 0), the task is to count the subarray whose elements sum up to a multiple of K, else print -1. A Read more →
Given a square matrix of n order in which two positions are filled. Fill two more positions such that a rectangle is formed by joining all points. Examples: Input: n=4 Matrix[][]= 1 Read more →
Given an integer array nums, return the sum of floor(nums[i] / nums[j]) for all pairs of indices 0 <= i, j < nums.length in the array. The floor() function returns the integer Read more →
Design the pattern as represented in the famous snake and ladders game. Your task is to print the pattern as represented in snake and ladders game for a given integer input N, Read more →