Skip to content
All Medium Articles
Round One: 1. Find Min and Max of an array in only one traversal. 2. Given a chessboard find maximum number of squares present. 3.… Read More
Given a graph with both directed and undirected edges. It is given that the directed edges don’t form cycle. How to assign directions to undirected… Read More
Given a list of word lists How to print all sentences possible taking one word from a list at a time via recursion? Example:  Input: {{"you",… Read More
I applied off-campus for internship. I got a call that my resume is shortlisted. Selection procedure consist of 4 rounds. Round 1: Online Coding Round… Read More
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
Hi, Recently i was interviewed for Amazon SDE-1 Position in Hyderabad.There a telephonic round followed by 4 F2F rounds. Telephonic Round: 1. Inserting an element… Read More
Unlike C++ and Java, C doesn’t support generics. How to create a linked list in C that can be used for any data type? In… Read More
There are 1000 wine bottles. One of the bottles contains poisoned wine. A rat dies after one hour of drinking the poisoned wine. How many… Read More
Following is a typical recursive implementation of Merge Sort  C++ // Recursive C++ program for merge sort #include<bits/stdc++.h> using namespace std;   // Function to… Read More
Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing… Read More
Write a function subtract(x, y) that returns x-y where x and y are integers. The function should not use any of the arithmetic operators (+,… Read More
Given a universe U of n elements, a collection of subsets of U say S = {S1, S2…,Sm} where every subset Si has an associated… Read More
I gave this interview for Senior Software Developer Role. Round 1: Lots of puzzles and algo’s. The interviewer didn’t let me write code for anything,… Read More
Attended coding interview for myntra. Question was based on the movement of Robot. G-GO one unit L-Turn left R-Turn right Given an input of string… Read More
Round 1: (Written Test) 1. Given a sorted array construct a Balanced Binary Search Tree. 2. Given a linked list, find whether linked list is… Read More
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
In a country, all families want a boy. They keep having babies till a boy is born. What is the expected ratio of boys and… Read More
There are 100 doors in a row, all doors are initially closed. A person walks through all doors multiple times and toggle (if open then… Read More
I was recently interviewed for SDE-II in Flipkart. A lot of emphases was on designing and GeeksforGeeks has been a lot of help. These are… Read More
First of all, i got the mail and was asked to attend one online test. Online test had 6 parts-psychometric test, aptitude, logical, English, computer… Read More