# Category Archives: Hash (adsbygoogle = window.adsbygoogle || []).push({});

## Count distinct elements in every window of size k

Given an array of size n and an integer k, return the of count of distinct numbers in all windows of size k. Example: Input:… Read More »

## Hashing | Set 2 (Separate Chaining)

We strongly recommend to refer below post as a prerequisite of this. Hashing | Set 1 (Introduction) What is Collision? Since a hash function gets… Read More »

## Walmart Labs Interview Experience | Set 2 (On-Campus)

1st round (Written Test) It was an online test of 90 minutes and was conducted on Hackerearth. It consisted of 10 MCQ’s and 3 coding… Read More »

## Check if two arrays are permutations of each other

Given two unsorted arrays of same size, write a function that returns true if two arrays are permutations of each other, otherwise false. Examples: Input:… Read More »

## Find Itinerary from a given list of tickets

Given a list of tickets, find itinerary in order using the given list. Example: Input: “Chennai” -> “Banglore” “Bombay” -> “Delhi” “Goa” -> “Chennai” “Delhi”… Read More »

## Amazon Interview Experience | Set 188 (For SDE1)

Recently I am interviewed for Amazon SDE-1 position for Bangalore. There are 3 F2F rounds followed by a telephonic round. As it was a drive,… Read More »

## Find number of Employees Under every Employee

Given a dictionary that contains mapping of employee and his manager as a number of (employee, manager) pairs like below. { “A”, “C” }, {… Read More »

## Taxi4Sure Interview Experience

I had attended taxi4sure drive. Their process is written test followed by n f2f interviews. Written test 1) Given an array of students whose ranks… Read More »

## Flipkart Interview Experience | Set 21

I was interviewed at Flipkart. Following was my interview experience. Initially there was one telephonic screening round. then I was called at their bangalore office.… Read More »

## Design a data structure that supports insert, delete, search and getRandom in constant time

Design a data structure that supports the following operations in Θ(1) time. insert(x): Inserts an item x to the data structure if not already present.… Read More »

## Advantages of BST over Hash Table

Hash Table supports following operations in Θ(1) time. 1) Search 2) Insert 3) Delete The time complexity of above operations in a self-balancing Binary Search… Read More »

## Group multiple occurrence of array elements ordered by first occurrence

Given an unsorted array with repetitions, the task is to group multiple occurrence of individual elements. The grouping should happen in a way that the… Read More »

## Find the longest substring with k unique characters in a given string

Given a string you need to print longest possible substring that has exactly M unique characters. If there are more than one substring of longest… Read More »

## Microsoft Interview Experience | Set 51 (For SDE Intern)

Recently Microsoft visited our campus for SDE intern. The process took over 4 months. Round 1 (Online MCQ’s) Time-30 mins This round consisted of 25… Read More »

## Snapdeal Interview Experience | Set 8 (On Campus)

Snapdeal conducted placement drive at my campus in January last week for Software Developer. Eligibility- All CSE (no pointer criteria) Online Test- 21 (MCQ) +2… Read More »