Given an array of integers. The task is to find the Minimum index of repeating element in an array in linear time and in a single traversal of the array. Examples: Input Read more →
Data Structures
5 postsGiven a number N, the task is to print all duplicate digits of that number in sorted order. Examples: Input: 123412989 Output : 3 4 8 Explanation : The unique digits are Read more →
Amanada, a school kid, is learning English alphabets. Her teacher devised a small game to make the task fun. A grid of ‘m’ rows and ‘n’ columns is filled with English alphabets. Read more →
Given a binary tree and two nodes a and b, the task is to print the maximum node value that lies in the path connecting the nodes a and b. If either Read more →
In a prison, there are N cells. The positions of the cells are given in an array. The Jailer has to place all the prisoners in the cells in an ordered manner Read more →
Hashing is the process of taking the input string of any length and turning it into cryptographic fixed output. Hashing is not an “encryption” we can’t retrieve the original data by decrypting Read more →
Given a Rooted Tree with n node, labeled from 1 to n and tree is rooted at node 1. Parent of i-th node is p[i], i is starting from 2 as 1 Read more →
Given an integer array arr[], the task is to find the number of triplets at distinct indices that can be removed from the array such that the mean remains the same as Read more →
Given a positive integer N, the task is to construct an array of length N and maximize the value at index K such that the sum of all the array elements is Read more →
Given an array of size n, your task is to find the least common multiple or LCM of all the elements of the array. Examples: Input : arr = [ 8, 9, Read more →