Software Engineer / Developer Interview Questions
- 4of 4 votes
AnswersFind the latest version of released software. For e.g1. 2 and 2.2.. latest is 2.2.
- techpanja October 02, 2013 in United States
eg2: 3.1 and 3.1.3... latest version is 3.1.3... version is passed as string in above format.| Report Duplicate | Flag | PURGE
Ebay Software Engineer / Developer Java - 2of 2 votes
AnswersDesign an architecture for REST APIs where you have to upload big data like images/videos etc. Request should be async. Follow up: How will you tune the performance if you have millions of requests coming at same time? Clues: Queueing the request, Storing data in filesystems rather than traditional DB etc.
- techpanja October 02, 2013 in United States| Report Duplicate | Flag | PURGE
Ebay Software Engineer / Developer Distributed Computing - -4of 6 votes
AnswersRotate a M*N matrix by 90 degree.
- sivaji8 October 02, 2013 in United States
Is this answer right?
public void rotateMN(int[][] input){
int i = input.length;
int j = input[0].length;
int m = j;
int n = i;
int[][] newArray = new int[m][n];
for(int j = input[0].length-1, m=0; ;i--, m++ ){
for(int i = input.length-1, n=0; i >= 0 ; i--, n++){
newArray[m][n] = input[i][j];
}
}
}
Will this also work for N*N matrix rotation by 90 degrees?
The time complexity is O(N) since it just traverse the input matrix and copy it to the new matrix. The space complexity is (MN) + (MN) = So MN.
Is it possible to do rotation for M * N matrix in space? If so please provide that answer
Whats this space and time complexity?| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Data Structures - -1of 1 vote
AnswersPrint 010101010.... or 1010101010... without using arithmatic operations.
- Anonymous October 01, 2013 in United States| Report Duplicate | Flag | PURGE
Informatica Software Engineer / Developer - 0of 0 votes
AnswersGiven an array of numbers, only one number appears once, others twice. Find the number. What if two numbers appear once, what if 500 numbers appear once. How to find these numbers.
- lizhong207 September 30, 2013 in United States
I know if only one number appears once, we could use xor, but what if more than one? How to do it efficiently?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - -4of 6 votes
AnswersIn what situations bubble sort, selection sort, insertion sort, merge sort, quick sort and heap sort will have best time complexity. Provide example for each sort and explain
- sivaji8 September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Sorting - -1of 1 vote
AnswerImplement a timer library.
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - -1of 1 vote
AnswersGiven two dates (y/m/d) determine implement a function that determines whether the dates are a month apart.
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswersImplement a garbage collector that avoids the circular dependency problem (graph theory problem).
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswerDesign an elevator system for a building. What metrics are useful to determine elevator performance?
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Ideas - 0of 2 votes
AnswersGiven an array of ints, find all pairs that add up to a target value.
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 6 votes
AnswersDescribe a time you encountered an issue and how you fixed it.
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Behavioral - 0of 0 votes
AnswersDesign a distributed keystore with a single write end-point and multiple read end-points.
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Distributed Computing - 0of 0 votes
AnswersWhat steps are involved in serving a web page to a client?
- RQYB September 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Networking / Web / Internet - 2of 2 votes
Answers1000 elements in one bag and 1 million elements in another. how do you find common elements among them. Also give the complexity of your solution.
- sivaji8 September 27, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 1of 1 vote
AnswersWrite a class DominoChecker that has a method called addBox(int[]) that takes a box of five dominoes, described as a list of 10 integers (explained after), adds it to a collection, and returns true if a box with the same dominoes was already in the collection and false otherwise. A box of dominoes is encoded as a list of 10 integers from 0 to 9, where a pair of numbers represent a domino. For example: 0,2,9,1,3,3,7,4,5,6 represents a box containing dominoes: (0,2); (9,1); (3,3); (7,4); (5,6). http://en.wikipedia.org/wiki/Dominoes for more basic info (like pictures)
- veeru September 27, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer - 1of 1 vote
AnswersFind if all the leaf nodes are at same level in binary tree.
- poojabasia September 26, 2013 in India
Recursive and non-recursive approach?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven 2 quad-trees find the intersection of black-pixels.
- chandeepsingh85 September 26, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Trees and Graphs - 0of 0 votes
AnswersDefine a quad-tree for a black and white image. Count the number the of black pixels.
- chandeepsingh85 September 26, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Trees and Graphs - 25of 27 votes
AnswersGiven a large network of computers, each keeping log files of visited urls, find the top ten of the most visited urls.
- chandeepsingh85 September 26, 2013 in United States
(i.e. have many large <string (url) -> int (visits)> maps, calculate implicitly <string (url) -> int (sum of visits among all distributed maps), and get the top ten in the combined map)
The result list must be exact, and the maps are too large to transmit over the network (especially sending all of them to a central server or using MapReduce directly, is not allowed)| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design - 1of 1 vote
AnswersHaving an infinite stream of numbers write a function to take an element with equal probability for each.
- chandeepsingh85 September 26, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Probability - -2of 2 votes
AnswersGiven a class of block reader, read in unlimited string flow.
- chandeepsingh85 September 26, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer String Manipulation - 2of 2 votes
AnswersYou are given a grid, with points on the intersections (think a map of streets, people are standing on random corners). Write code to calculate the point on the grid that is the shortest distance from every point on the grid.
- chandeepsingh85 September 26, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Trees and Graphs - 2of 2 votes
AnswersGiven a set top box:
- chandeepsingh85 September 26, 2013 in United States
a, b, c, d, e,
f, g, h, i, j,
k, l, m, n, o
p, q, r, s, t
u, v, w, x, y
z
Write code to give the character sequence given a word, For example, if the word is "CON", the function will print this:
Right//now we're at B
Right//now we're at C
OK//to select C
Down
DOwn
Right
Right
OK//to select O
Left//now at N
OK//to select N
note: Be careful when you're at Z. if you go to the right, you will get stuck.
Afterwards, the interviewer adds a space to the right of 'Z' to test the code.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Site Reliability Engineer String Manipulation Algorithm - 0of 0 votes
AnswersDesign and implement a class, which returns a random string value from a set with an arbitrary probability distribution given by an array of probabilities. Using an existing random number generator with a uniform distribution(e.g., Random.nextFloat()), you return the string for the random float value based on the strings probability distribution.
- chandeepsingh85 September 26, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Probability - 4of 4 votes
Answersdesign a method which consumes an integer and output the corresponding column number in Microsoft Excel ( ex. A, B, C......Z, AA, AB....ZZ....)
- chandeepsingh85 September 25, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer - 0of 0 votes
AnswersGiven an array of randomly sorted integers and an integer k, write a function which returns boolean True if a pair of numbers exists in the array such that A[i] + A[j] = k and False otherwise. Provide an O(N) and an O(N log N) solution.
- djlewis September 25, 2013 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Algorithm - 0of 2 votes
AnswersCreate a QR code reader App without using 3rd party library?
- SJK September 24, 2013 in India
I am familiar with only using some 3rd party library.| Report Duplicate | Flag | PURGE
Software Engineer / Developer Android - 1of 1 vote
AnswersGiven the amazon webpage, if you select any one item, you get recommendations down, for eg:- when I select a book, I get other book recommendations as well as movies related to the book, so If I now click on a movie, then I get something like popcorn which is related to movies, then I get food items as recommendations which is related to popcorn and so on.
- AVK September 22, 2013 in United States
So how do find how many clicks it takes to reach a particular item? for eg:- from a book to a pizza| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersGiven a community of people, find out a person who could be a potential mayor. Constraints as below.
- AVK September 22, 2013 in United States
1) Mayor does not know any of the people in the community.
2) All the people in the community must know the mayor, that is he has to popular.
My apologies, I forgot to mention that the interviewer had also given me a function called " knows(int a, int b) " that returns a boolean value if a knows b.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer