## Maximum distance between two occurrences of same element in array

Given an array with repeated elements, the task is to find the maximum distance two occurrences of an element. Examples: Input : arr[] = {3,… Read More »

- Print characters and their frequencies in order of occurrence using a LinkedHashMap in Java
- Extendible Hashing (Dynamic approach to DBMS)
- Count number of pairs in array having sum divisible by K | SET 2
- What are Hash Functions and How to choose a good Hash Function?
- Minimum deletions required to make frequency of each letter unique
- Sum of nodes in the left view of the given binary tree
- Check duplicates in a stream of strings
- Find missing elements from an Array
- Print characters having even frequencies in order of occurrence
- Program to parse the Molecules and get the Atoms count
- XOR of elements in an array having prime frequency
- Sum of nodes in the right view of the given binary tree
- Triangle of numbers arising from Gilbreath's conjecture
- XOR of K smallest prime and composite numbers from the given array
- Bitwise AND of the sum of prime numbers and the sum of composite numbers in an array
- Absolute difference between the XOR of Non-Prime numbers and Prime numbers of an Array
- Print characters having prime frequencies in order of occurrence
- Count equal element pairs in the given array
- Number of distinct pair of edges such that it partitions both trees into same subsets of nodes
- Product of elements in an array having prime frequency
- GCD of elements which occur prime number of times
- Print the season name of the year based on the month number
- Area of the largest square that can be formed from the given length sticks using Hashing
- Check if two Integer are anagrams of each other
- XOR of K largest prime and composite numbers from the given array

Given an array with repeated elements, the task is to find the maximum distance two occurrences of an element. Examples: Input : arr[] = {3,… Read More »

Given a binary tree, print the number of root to leaf paths having equal lengths. Examples: Input : Root of below tree 10 / \… Read More »

Given a string str and Q queries. Each query contains a pair of integers (i1, i2) and a character ‘ch’. We need to replace characters… Read More »

Given an array of n elements such that elements may repeat. We can delete any number of elements from array. The task is to find… Read More »

Given a binary tree, find if there is a pair in root to a leaf path such that sum of values in pair is equal… Read More »

Given an array of lower case strings, the task is to find the number of strings that are distinct. Two strings are distinct if on… Read More »

Given a matrix of distinct values and a sum. The task is to find all the pairs in given whose summation is equal to given… Read More »

Given an array of distinct positive integers and a number x, find the number of pairs of integers in the array whose XOR is equal… Read More »

Interviewed for Mumbai location. Round 1 (Written round – 45 min) 1. Count the number of occurrences in a sorted array 2. In given range,… Read More »

Given a string which consists of only 0s, 1s or 2s, count the number of substrings that have equal number of 0s, 1s and 2s.… Read More »

Given N point on a 2D plane as pair of (x, y) co-ordinates, we need to find maximum number of point which lie on the… Read More »

Given an array of strings (all lowercase letters), the task is to group them in such a way that all strings in a group are… Read More »

Written Round: This Round was pen and paper round consisted of 45 questions out of which only 2-3 are aptitude and rest are from DS,… Read More »

Round 0: (Written): 20 MCQs + 2 Coding Questions MCQs – Topics: OS ,DS ,DBMS – (Serialization etc.), Aptitude (simple puzzle kind.) Coding Questions: Given a… Read More »

Given a dictionary of words, find all strings that matches the given pattern where every character in the pattern is uniquely mapped to a character… Read More »