Software Engineer Interview Questions
- 26of 26 votes
AnswersIf a canoe can hold 2 kids and a max weight of 150 lbs, write a function that returns the minimum number of canoes needed, given a list of kids and their weights.
- Rando May 17, 2015 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer - 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 - 0of 0 votes
AnswersThere are three threads in a process.
- jim.shan.JS May 15, 2015 in United States
The first thread prints 1 1 1 …, the second one prints 2 2 2 …, and the third one prints 3 3 3 … endlessly.
How do you schedule these three threads in order to print 1 2 3 1 2 3 …?| Report Duplicate | Flag | PURGE
Salesforce Software Engineer Threads - 3of 3 votes
Answerscreate a grid and show data, they have provided some JSON file for it. we should be able to configure sorting anf fitering for some coumns. paging is also required. we need to make it in pure JS.
- rajansoft1 May 14, 2015 in India| Report Duplicate | Flag | PURGE
Payu Software Engineer JavaScript - 1of 1 vote
AnswersWrite a function which, given two integers (a numerator and a denominator), print the first N digits of a rational number. For example, for 5 / 3 with N=5, the result should be "1.66666". N=2: 1.66
- Dan Shah May 13, 2015 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer - 2of 2 votes
Answers0 1 ?
- .netDecoder May 08, 2015 in United States
? wildcard for 0 or 1
"01?"
010 011
Example:
01?0?
Will produce
01000
01100
01001
01101| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm - 3of 5 votes
AnswersLook at the sequence below:
- amirtar May 05, 2015 in United States
1, 11, 21, 1211, 111221, 312211, ...
Write a code that receives n and returns the nth element of the sequence. If it gets 4 as input of the method it should return 1211.| Report Duplicate | Flag | PURGE
Google Software Engineer - 0of 2 votes
AnswersThe text of question below is exactly given by Google interviewer. So they are owner of the text and I am just quoting them. I am not the author of the text below:
- amirtar May 05, 2015 in United States
"
Imagine a museum floor that looks like this:
.#.G.
..#..
G....
..#..
G == Museum Guard
# == obstruction/impassable obstacle
. == empty space
Write a piece of code that will find the nearest guard for each open floor space. Diagonal moves are not allowed. The output should convey this information:
2#1G1
12#12
G1223
12#34
You may choose how you want to receive the input and output. For example, you may use a 2-d array, as depicted here, or you may use a list of points with features, if you deem that easier to work with, as long as the same information is conveyed.
"| Report Duplicate | Flag | PURGE
Google Software Engineer Algorithm Ideas Math & Computation - 1of 3 votes
AnswersWe know a string is Palindrome if it is the same reading from both sides. Now we define the following string also Palindrome:
- amirtar May 05, 2015 in United States
A man, a plan, a canal, Panama!
Write a code that returns if an string is palindrome and it should return true for above input. (Without directly saying, I should conclude that I have to only consider alphanumerical characters in a string). In addition, we assume the string is very long and we can not keep a copy of this string or even a copy of preprocessed version of this string. Therefore the result should be returned with the first sweep of the string.| Report Duplicate | Flag | PURGE
Facebook Software Engineer Algorithm String Manipulation - 0of 2 votes
AnswersAdd a third dimension of time to a hashmap , so ur hashmap will look something like this - HashMap<K, t, V> where t is a float value. Implement the get and put methods to this map. The get method should be something like - map.get(K,t) which should give us the value. If t does not exists then map should return the closest t' such that t' is smaller than t. For example, if map contains (K,1,V1) and (K,2,V2) and the user does a get(k,1.5) then the output should be v1 as 1 is the next smallest number to 1.5
- randomCoder1988 May 02, 2015 in United States for Mobile| Report Duplicate | Flag | PURGE
Uber Software Engineer - 3of 3 votes
AnswersThere are N pots. Every pots have some water in it. They may be partially filled. So there is a Overflow Number 0 associated with every pot which tell how many minimum stone pieces are require for that pot to overflow. So if for a pot 0-value is 5 it means minimum 5 stone pieces should be put in that pot to make it overflow. Initially a crow watched those pots and by seeing the water level he anticipated 0-value correctly for every pot ( that is he knew 01 to On). But when he came back in evening he found that every pot is painted from outside and he is not able to know which pot has what 0-value. Crow wants some K pots to overflow so that he can serve his child appropriately. For overflow of pots he need to search for stone in forest( assume that every stone has same size). He wants to use minimum number of stones required to overflow K pots. But only he know the 0-value of pots he doesn't know now which pot has what 0-value. So the task is that in what minimum number of stones he can make K pots overflow in worst case.
- veeru April 29, 2015 in India for Development
Input/Output Specifications Input Specification: 1) A array 0 corresponding to 0-value of N pots {01, 02, On} 2) Number of pots 3) K -value ( number of pots which the crow wants to overflow}
Output Specification: Minimum number of stones required to make K pots overflow in worst case. Or -1 if input is invalid
Example: Let say there are two pots pot 1 has 0 value of 5 , 01= 5 pot 2 has 0 value of 58, 02= 58 Let say crow wants to make one of the pot to overflow. If he know which pot has what 0-value he would simple search for 5 stones and put then in pot 1 to make it overflow. But in real case he doesn't know which pot has what 0-value so just 5 stones may not always work. However he does know that one pot has 0-value S and other has 58. So even in worst case he can make one of the pot overflow just by using 10 stones. He would put 5 stones in one pot if it doesn't overflow he would try the remaining 5 in the other pot which would definitely overflow because one of the pot has 0-value of 5. So the answer for above question is minimum 10 stones even in worst case. Input : Input 1= {5,58} Input 2= 2 Input 3= 1 Output : 10| Report Duplicate | Flag | PURGE
Amazon Software Engineer - 2of 2 votes
AnswersDesign a Binary search tree using Epic as Input
- katenaomi247 April 27, 2015 in United States| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer Object Oriented Design - 0of 0 votes
AnswersDesign a class to implement chess and checkers game individually.
- katenaomi247 April 27, 2015 in United States| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer Object Oriented Design - 0of 0 votes
Answersdesign a class to provide information about the disease of a patient with details like who reported the disease(patient/doctor/relative), different symptoms of the disease, severity, method that returns when was that disease detected in that patient. Along with info if it is allergy and not a disease so that it can be updated easily along with record the time of the allergy report.
- katenaomi247 April 27, 2015 in United States| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer Object Oriented Design - 0of 0 votes
Answerscreate a class to tell a nurse the frequency of medicine that a patient must take, i.e. a system to tell patients when to take medication and create a class with an object that holds temperatures of a person and can say whether or not they have a fever.
- katenaomi247 April 27, 2015 in United States| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer Object Oriented Design - 0of 0 votes
Answersdesign a class to store the information of the patients visiting to the hospital., i.e. a class which stores name, address, phone number, male/female, prefix to the name. Also, how will you handle job in case of multiple phone numbers/addresses, multiple locations
- katenaomi247 April 27, 2015 in United States
(If a person is both at 12 PM in USA on a date, then that date is different from date in India), how will you handle the validations of these fields when the user enters the values.| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer Object Oriented Design - 0of 0 votes
AnswerDesign a ride sharing application
- randomCoder1988 April 26, 2015 in United States| Report Duplicate | Flag | PURGE
Uber Software Engineer - 0of 0 votes
AnswersI am graduating in december2015 and I am targeting google. I have almost 6-8 month to go for it.I am a python developer although I have 3 year of experience in java but its 1.2 years pass I didn't touch that so I want to continue with python. I am using Python from last one year. any suggestion about python ? Or i have to go back and start with java again?
- Fatma Zaman April 24, 2015 in United States| Report Duplicate | Flag | PURGE
xyz Software Engineer - 0of 0 votes
Answersdesign a BST with CERNER as an input.
- katenaomi247 April 23, 2015 in United States| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer Object Oriented Design - 0of 0 votes
AnswerDesign and implement checkers game using oops concept
- katenaomi247 April 23, 2015 in United States| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer Object Oriented Design - 0of 0 votes
AnswersDesign implement chess game using Java
- katenaomi247 April 23, 2015 in United States| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer Object Oriented Design - 0of 0 votes
AnswersDifferent types of testing..If you had to determine whether a padlock was functioning properly with only 3 tests, what tests would you use?
- katenaomi247 April 23, 2015 in United States| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer - 0of 0 votes
Answersdesign a class that will be used to store the information of the patients visiting to the hospital., i.e. a class which stores demographic information of a person like name, address, phone number, male/female. What if the person has any prefix to the name, multiple phone numbers/addresses, how will you handle job in case of multiple locations
- katenaomi247 April 23, 2015 in United States
(If a person is both at 12 PM in USA on a date, then that date is different from date in India), how will you handle the validations of these fields when the user enters the values using java| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer Object Oriented Design - 0of 0 votes
AnswersDesign a class Make an object that holds temperatures of a person and can say whether or not they have a fever using java
- katenaomi247 April 23, 2015 in United States| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer Object Oriented Design - 0of 0 votes
Answerscreate a class with object that tells a nurse the frequency of medicine that a patient must take, i.e. a system to tell patients when to take medication using java
- katenaomi247 April 23, 2015 in United States| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer Object Oriented Design - 1of 1 vote
Answersdesign a class (give different methods and variables that will be used) that will provide information about the allergy of a patient.
- katenaomi247 April 23, 2015 in United States
e.g. who reported the allergy(patient/doctor/relative), different symptoms of the allergy that are detected, severity, method that returns when was that
allergy detected in that patient. Along with info about disease if it is not allergy, and can be updated easily, how would you record the time of the disease report using java| Report Duplicate | Flag | PURGE
Cerner Corporation Software Engineer Coding Java Object Oriented Design - 0of 0 votes
AnswersYou are writing a simulation for a print server. This print server can accept jobs from 3 places - network, USB, or operator. It can dispatch only one job at a time. Each input job should contain an integer t which is the time in seconds it will take to process the job. Write a multi-threaded program to simulate the server and provide some simulated load with jobs. Think, of some interesting statistics your program should emit and code them in.
- forstupidshit150 April 20, 2015 in United States for Cloud+Enterprise| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Algorithm - 1of 1 vote
AnswersFind and fix the bugs in the following function that is supposed to remove the head element from a singly linked list.
- forstupidshit150 April 20, 2015 in United States for Cloud+Enterprise
void RemoveHead (node * head)
{
free(head);
head = head - > next;
}| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Algorithm - 1of 1 vote
AnswersWrite a function that takes a string as an input and outputs an integer, e.g. turning "1234" into 1234.
- forstupidshit150 April 20, 2015 in United States for Cloud+Enterprise| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Algorithm - 1of 1 vote
Answersyou have a interface called Op and a Filter interface
- HBY April 17, 2015 in United States
interface Op<T> {
public boolean hasNext();
public boolean<T> next();
}
interface Filter<T1, T2> {
public boolean filter(T1 t1, T2 t2);
}
design a MutualOp that has below API, MutualOp should return the ops that combine op1 and op2, also should meet with the filter
class MutualOp implements Op{
public MutualOp(Op left, Op right, Filter<Op, Op> filter) {
this.left = left;
this.right = right;
this.filter = filter;
}
public boolean hasNext {
......
}
public T next {
......
}
}| Report Duplicate | Flag | PURGE
Facebook Software Engineer Algorithm