## Problem of 8 Neighbours of an element in a 2-D Matrix

Given a 2-D Matrix and an integer ‘K’, the task is to predict the matrix after ‘K’ iterations given as follows: An element 1 in… Read More »

- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- What is Competitive Programming and How to Prepare for It?
- Find minimum difference between any two elements | Set 2
- Why Should I Learn Coding?
- Check whether two strings contain same characters in same order
- Total number of possible Binary Search Trees using Catalan Number
- Maximize the happiness of the groups on the Trip
- Find the number of pair of Ideal nodes in a given tree
- Lexicographically Smallest Topological Ordering
- Find the minimum number of elements that should be removed to make an array good
- Sum of digits with even number of 1's in their binary representation
- Find sub-arrays from given two arrays such that they have equal sum
- Count of all possible values of X such that A % X = B
- Equal Sum and XOR of three Numbers
- Check which player visits more number of Nodes
- Find the Nth Mosaic number
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Check whether a number can be represented as sum of K distinct positive integers
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Longest string in an array which matches with prefix of the given string
- Generate elements of the array following given conditions
- Make the list non-decreasing by changing only one digit of the elements
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Count of strings whose prefix match with the given string to a given length k
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Find the time which is palindromic and comes after the given time
- Find two vertices of an isosceles triangle in which there is rectangle with opposite corners (0, 0) and (X, Y)

Given a 2-D Matrix and an integer ‘K’, the task is to predict the matrix after ‘K’ iterations given as follows: An element 1 in… Read More »

Given a number N(>=3). The task is to find the three integers (<=N) such that LCM of these three integers is maximum. Examples: Input: N… Read More »

Given an integer N, the task is to count the number of triplets (a, b, c) such that a2 + b2 = c2 and 1… Read More »

Given an integer K and an array arr each of whose element x represents a square with two of its vertices as (0, 0) and… Read More »

Given an integer K and a string str of lowercase English characters, the task is to find a string s such that when s is… Read More »

Given a string. The task is to find the maximum occurred substring with a maximum length. These occurrences can overlap. Examples: Input: str = “abab”… Read More »

Given an integer N, the task is to find the sum of the digits of the number N written in all the bases from 2… Read More »

Given an array arr, the task is to find the sum of the elements which have prime frequencies in the array. Note: 1 is neither… Read More »

Given two integers N and K, the task is to generate a permutation of N numbers (Every number from 1 to N occurs exactly once)… Read More »

Given three integer K, L and R (range [L, R]), the task is to find the minimum number of elements the range must be extended… Read More »

Given three integers N, A and B, the task is to find whether N can be represented as sum of A’s and B’s. Examples: Input:… Read More »

Given three integers N, A and B, the task is to find whether N is divisible by any number that contains only A and B… Read More »

Given an array of N elements, the task is to convert it into a permutation (Each number from 1 to N occurs exactly once) by… Read More »

Given a string ( containing characters from ‘0’ to ‘9’) and two digits and . The task is to find the substring in the given… Read More »

Given two integers N and M, partition N into M integers such that the difference between the maximum and minimum integer obtained by the partition… Read More »