Recent Interview Questions
- 4of 4 votes
AnswersWhat is the data structure you will use to model Tennis tournament of size number of players n=8. Splitted into 2 groups? What is the complexity of finding the winner and the runner.
- hari@hbiz.in September 26, 2012 in India| Report Duplicate | Flag | PURGE
Synopsys R&D Software Engineer / Developer Data Structures - 4of 4 votes
AnswersYou are given set of strings, You have return anagrams subsets from it. An anagram set is that one where every string is an anagram of another string. If the subset contains only one string, don't include that in the result.
- sonesh May 11, 2017 in United States| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm String Manipulation - 4of 4 votes
AnswersFind distance between any two nodes of binary tree and binary search tree.
- Raje July 19, 2017 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Trees and Graphs - 4of 4 votes
AnswersGiven a matrix containing 0 and 1 only. WAP to find a square with all border as 1(not inside) also extend it for rectangle.
- Nascent July 22, 2013 in India| Report Duplicate | Flag | PURGE
Amazon - 4of 4 votes
AnswersGiven a linkedlist, write an algorithm to divide the linkedlist into two linkedlists, the first contains the Fibonacci numbers in the list and the second contains the non-Fibonacci numbers.
- a.ahmed.shalabey October 23, 2015 in United States for Software Development
Test the algorithm after developing the code| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm C Data Structures - 4of 4 votes
AnswersDesign and implement the constructor for the minesweeper game that takes in the dimension of the field and number of mines as input
- JSDUDE September 24, 2015 in United States| Report Duplicate | Flag | PURGE
Tableau Software Engineer / Developer Algorithm Object Oriented Design - 4of 4 votes
Answersgiven a matrix of size m * n, place k students in such a way so that cheating in an exam could be minimized
- dddd July 27, 2013 in United States| Report Duplicate | Flag | PURGE
Algorithm Brain Teasers Coding - 4of 4 votes
AnswersHow will you calculate the size of the object in java ? I gave answer for the serialized objects. The interviewer then modified the question that an ArrayList contains 10 non-serialized objects. How will you find out which object is the heaviest one ? He again added that the ArrayList is not a generic one, it may contain any kind of object like Organisation, Employee, Salary, PersonalDetails,OfficialDetails etc all object type. Now you have to find out which one is the heavy object through java program. He said there is some way you can measure the size of the object. Please help me.
- Mr D July 09, 2013 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Java Developer Java - 4of 4 votes
Answerswrite a java program to reverse a string.
- Anil April 17, 2013 in United States| Report Duplicate | Flag | PURGE
Adobe Quality Assurance Engineer - 4of 4 votes
AnswersFeb On-site Google
- aonecoding March 10, 2018 in United States
DP Problem. Given the length and width of a matrix, get the number of paths from bottom-left to bottom right.
You may only walk into those 3 directions ➡ (right) ↗ (upper-right) ↘ (lower-right) at each point.
Follow-up: optimize 2d DP to 1d DP of linear extra space.
Follow-up: what if some cells are blocked
System Design
Availability test/debug on distributed system. Discussed and drafted about failover, replication, NoSQL etc.
Interviewer seemed to be expecting more but time ran out.| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - 4of 4 votes
AnswersGiven an integer array which represents the heights of adjacent vertical bars standing on the ground.
- viveksingh.ds April 08, 2017 in India
The width of each bar is 1. Now you have to pick two bars and remove all the remaining such that when
rain falls the water collected between two bars is maximum. Note that the distance between bars
remains the same after removing the remaining bars.
eg:
1. [10,5,6,12,14] ans: 30 (10*3)
2. [3 16 10 5 6 12 20 18] ans: 80 (16*(number of integers between 16 and 18)).| Report Duplicate | Flag | PURGE
Directi Software Developer Problem Solving - 4of 4 votes
AnswersGiven that an external service gives a list of credit cards that have become fraud, design a fraud management system for a shopping website for bookings with fraud credit cards
- mesmerizing.memories123 October 14, 2016| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 4of 4 votes
AnswersGiven a list of queries and their counts, write a function that returns one of the queries at random such that over time it returns an equal distribution based on the counts provided in the input.
- Rando May 17, 2015 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - 4of 4 votes
AnswersGive an 2d-characters Grid, char[][] A, and a dictionary, List<String> dict. Search all possible words in the 2d-Grid.
- wyu277 December 04, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm - 4of 4 votes
AnswersYou have written a memory manager and after using it your coworker complains that he is facing severe issues of fragmentation. What could be the reason(s) and how can you fix it
- vik October 04, 2013 in United States| Report Duplicate | Flag | PURGE
NVIDIA Software Engineer / Developer Computer Architecture & Low Level Debugging Operating System - 4of 4 votes
AnswersAmazon
- aonecoding January 06, 2018 in United States
Given an ArrayList of Nodes, with each Node having an ID and a parent ID, determine whether the List is given in preorder.| Report Duplicate | Flag | PURGE
Amazon Software Engineer Algorithm - 4of 4 votes
AnswersWhat happens when you type in shell
list=$(ls)
Interviewer expected the list of system-calls made, file-descriptors involved etc.
- Moony April 29, 2014 in United States| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Unix - 4of 4 votes
Answers1/4 round of FB on-site interview, Master Degree, Hired
- aonecoding July 15, 2017 in United States
1.1 diameter of tree
1.2 find the point which have the maximum overlap of intervals| Report Duplicate | Flag | PURGE
Facebook Software Engineer Algorithm - 4of 4 votes
AnswersWrite atof in Java, which converts a string representation of a float (like "342.18E-10") to an actual float without using any built-in parsing functions.
- dke.ade February 25, 2014 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer Intern Algorithm - 4of 4 votes
AnswersPrepare test plan for a new feature of " deposit cheque via mobile app " which is added under menu tab.
- raghunath.e November 14, 2019 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test test - 4of 4 votes
AnswerWish Interview
- aonecoding November 03, 2017 in United States
-Phone: Two sum, Three sum, N sum(recursion)
Onsite:
-Implement merge sort (recursion&iteration)
-Merge two sorted arrays: one of length m+n, the other n; store the result in the longer array
-Given a number print diamond:
Given 1
Pirnt 1
Given 3
Print
1
121
1
Given 5
Print
1
121
12321
121
1
- Rank N people in a game. There may be a tie among participants. How many possible ways of ranking there is.
- Design: Define a bot as an IP that hits the web app over M times in the past T seconds (not necessarily hits on the same page. Also take into account different API calls.) How to design a bot detector layer and where to place it in the system.| Report Duplicate | Flag | PURGE
Wish Solutions Engineer Algorithm - 4of 4 votes
AnswersGroup by with having related questions. ER provided was customer table.
- harshvp April 12, 2017 in United States for Search| Report Duplicate | Flag | PURGE
Facebook Data Engineer Database - 4of 0 votes
AnswersWrite a function to convert integers to roman numerals with 1=I, 5=V, 10=X, 100=C, 1003=M. E.g. 3999 = MMMCMXCIX
- Anonymous September 25, 2008
This was tougher than I thought.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 4of 0 votes
AnswersGiven location of huge number of points (you decide the data structure to represent them). Write a function that returns the number of points that are with distance D of a given point P.
- SG October 15, 2008
Write function, complete with what data structures, function signature etc.| Report Duplicate | Flag | PURGE
National Instruments Software Engineer / Developer Large Scale Computing - 4of 0 votes
AnswersGive me the best way to multiply an integer by 3.5. There are many solutions to this but (x>>1)+x+(x<<1) is the best since it is least prone to overflowing.
- Anonymous September 25, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Computer Architecture & Low Level - 4of 0 votes
AnswersGiven a canoe, what test cases would you write for it.
- offerFromMS October 14, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing - 4of 0 votes
AnswersThere is an array of 52 numbers ? How do you shuffle this array ? Whats the complexity of your algorithm ? What are the possible test cases ? How do you change the design and or code if this program is used by a house wife or casino?
- Nachiketha October 08, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 4of 0 votes
AnswersI was given a simple code which had strUppr() function and asked to find the bugs in the code.
- Stud January 16, 2009
Bugs were related to following topics
1. Return value of the function was pointer to an array which is wrong.
2. A while loop with length of a string was written. There length of string was not considered till the end of the array.
3. A range of characters were compared. If (x>a && x<z). Here the bug is that a and z will not be considered.| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer C - 3of 13 votes
AnswersIn a language, there are only 4 characters ‘h’, ‘i’,’r’, ‘e’. and we have to write a function which takes a string as input and returns whether the given input string is a “valid word” or not.
- hugakkahuga October 23, 2013 in India
Definition of valid word :
1. A given word is a valid word if it is of the form h^n i^n r^n e^n where n >=1. (eg: hhiirree)
2. Valid words has concatenation property i.e. if w1 and w2 are valid words w1w2 is also a valid word.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 3of 13 votes
AnswersPrint the numbers between 30 to 3000.
- Anonymous September 25, 2013 in United States
CONSTRAINT:
The numbers shouldnt contain digits either in incresing order or decreasing order.
FOLLOWING NOT ALLOWED
##123,234,345,1234,2345##increasing order,
##32,21,321,432,3210 etc##decresing order.
FOLLOWING ALLOWED:
243,27,578,2344 etc.,
Now see who ll code ths....| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer