Interview Questions

Microsoft    Adobe   Direct I    Google    Pubmatic    Salesforce

Amazon     Informatica      Infibeam      Thought Works

MAZ      SAP Labs      Flipkart     Synopsys      Carwale

Paytm     OLA 


Nuts and bolts problem.

Find the nearest sibling of a given node in a tree.

Find minimum distance of three arrays.

Given a sequence, find the subsequence with maximum sum.

Diameter of a binary tree.

Find balanced Binary sub-tree of size N in Binary Tree.

Implement Binary Search using one comparison per iteration.

Calculate square of a number without using arithmetic operators and inbuilt methods

Generic Swap function in C.

Print paths from root to all leaves in a Binary Tree.

Implement doubly link list with only one address field

Multiply two numbers using bitwise operators 

Find Median of infinite streams of numbers 

Url Encode a string 

Direct I:

Find minimum substring which contains all characters in a Set.


Find maximum fall in an array

Find nth minimum in Binary Search Tree

Reverse linked list without using recursion

Construct BST from given preorder traversal


Find average of all element of an array

Bitonic subarray with maximum length

Longest Bitonic subsequence


In an unsorted array, find a pair (a, b) such that a+b = k

Find out elements of Array2 which are not in Array1

Spiral order traversal of Binary Tree


Design LRUCache

Add two numbers represented by linked lists

Best time buy sell stock

Implement queue using stacks

Run Length Encoding

Given an array of 0 and 1, find out longest subarray with equal number of 0 and 1.

Find number of vertical lines that can cover whole nodes of Binary Tree

Set inorder successor of each nodes of Binary Tree

Flatten a multilevel linked list

Find the first occurrence of an integer in an array

Convert a binary tree to a tree that holds children sum tree

Reverse a Linked List in groups of given size


Given a transaction log in which each line contains a transaction detail (Customer Id, Customer name, Price), Find out the average price given by a customer


Implement T9 Dictionary

Reverse Level Order Traversal of Binary Tree

Thought Works:

Implement Game of Life  

MAZ Digital:

Push, Pop, FindMin in O(1) without extra space 

SAP Labs:

Move all zeroes to end of array 


Find the minimum window in a large string which contains all characters of another string.

Clone a linked list with next and random pointer

Find fixed point in array


Find the maximum sum in an array such that no two elements are adjacent

Check if any two intervals overlap among the given n intervals

Sort array which contains only 0 and 1


Find a triplet in an array that sum to given value


Coin change problem

Minimum distance between two numbers in an array


Modify Boolean matrix