Skip to content

Category Archives: Algorithms

Given an increasing sequence a[], we need to find the K-th missing contiguous element in the increasing sequence which is not present in the sequence.… Read More
Given a square matrix, mat[][] of dimensions N * N, the task is find the maximum sum of diagonal elements possible from the given matrix… Read More
Given a square matrix, mat[][] of dimensions N * N, the task is find the maximum sum of diagonal elements possible from the given matrix… Read More
Given a square matrix, mat[][] of dimensions N * N, the task is find the maximum sum of diagonal elements possible from the given matrix… Read More
Given a square matrix, mat[][] of dimensions N * N, the task is find the maximum sum of diagonal elements possible from the given matrix… Read More
Given two arrays arr1[] and arr2[] of N integers and array arr1[] has distinct elements. The task is to find the maximum count of corresponding… Read More
Given a 2D grid, each cell is either a zombie 1 or human 0. Zombies can turn adjacent horizont or vertical (up/down/left/right) human beings into… Read More
Given two arrays A and B of size N, the task is to maximize the sum of A[i]*B[i] across all values of i from 0… Read More
Given an array arr[] of size N and an integer K. The task is to multiply each element of the array by K. Examples :… Read More
Given two strings S[] and N[] of the same size, the task is to update string S[] by adding the digit of string N[] of… Read More
Given a positive integer N, the task is to find the Nth term in the series 0, 1, 1, 2, 5, 29, 841… Examples: Input:… Read More
Given string str containing both uppercase and lowercase letters, and an integer K. The task is to find the longest substring containing exactly K vowels… Read More
Given an N-ary tree. The task is to replace the values of each node with the sum of all its subtrees and the node itself. … Read More
Given three integers N, A and B, the task is to find a permutation of pairwise distinct numbers from 1 to N that has exactly… Read More
Given a string str of length of N that is in the encoded form with alphabets and * . The task is to find the… Read More

Start Your Coding Journey Now!