Staff Engineer Interview Questions | Glassdoor

Staff Engineer Interview Questions

874

Staff engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Member of Technical Staff Software Engineer at VMware was asked...

Jun 12, 2012
 How many race heats are needed to find the 3 fastest pinewood derby cars out of a field of 8, if only 4 cars can run at a time (assuming that every car will always run the way/speed and each lane is exactly equivalent)?7 AnswersEach heat rules out 1 car (that cannot be one of the 3 fastest).so is the answer 4 heat 1 (first 4 car) + 1 (4 second set) + 1( Top 2 from first + Top 2 from second set) + 1 (3 car heat among the 3rd placed car)Only two races of four cars in each. Get the times of all cars and sort them. You don't need any more races because the times will be the same in subsequent races. :)Show More Responses4 if we cant measure time3 if we cannot measure time.Choose 4 cars at random for the first race. Trivially the slowest car in that race can be removed from consideration. For the second race randomly choose 3 previously untested cars as well as the third place car from race one. If the car from race one wins then all other cars in race 2 are slower than all of top three cars in race one and may be discarded. Similarly if the car from race one is in last place all of the cars from the first race may be removed from contention. In effect, regardless of how this car performs in the second race three additional cars may be removed from consideration. With one car removed in the first race and three additional cars removed in the second only 4 cars remain. The remaining four cars may be raced simultaneously in a third race to provide the final solution.4 rounds choose 4 cars for the first round, and the other four from the second round; this makes up two round. The lowest cars in both round definitely cannot be part of the best 3. In the third heat, the last four cars from the first two rounds make up another round. At this point, its either all three in one round are the fastest, or the fastest two in one round and the best in the other. The winning 2 in this round are selected and a last round to determine the fastest three.

Member of Technical Staff Software Engineer at VMware was asked...

Jan 12, 2012
 Given a series of strings, find the biggest common prefix.4 Answers/** * Jun Zheng, Rice Univ * Given a series of strings, find the biggest common prefix. * Real question of VMware * Java7; running time: O(n^2) * @param str * @return */ private String biggestPrefix(String[] strs){ String prefix=strs; for(int i=1;i0;i++){ int j; for(j=0;j0)? prefix:"No such prefix!"; }How that works? You are considering "prefix" must come from the very first string, which is not true. In the following string set, the biggest common prefix is "xyzasd" - which this program fails to find! String[] arr = {"MxyzasdNmm", "kxyzasdDodal", "I am a Good Boy", "JadxyznasdM Golmal", "ABCDEF", "ABCDEFGH", "Sunnyvale", "CaliforniaKxyzaszzMon"};What? Prefix is not started from the very first string? Jesus I cannot read Eng!Show More Responsesx = ["Ravite", "Raviteja", "Ravby", "Raviejaain","Ravi" ] #Given String y = x for i in x: if len(i)> len(y): y = i fin = [] y = list(y) for i in range(len(y)): count = 0 for j in range(len(x)): if y[i]==x[j][i]: count +=1 if count == len(x): fin.append(y[i]) else: break if len(fin) > 0: print "".join(fin) else: print "No common prefix in series"

Staff Hardware Engineer at Qualcomm was asked...

May 2, 2013
 If you have a 600 digit number with only 0's and 1's, and exactly 300 1's, can the number be a square?6 AnswersNoI am trying to undersatnd why you say the answer is No. for a 6 bit binary number, of which 3 bits are exactly 1s. 25 and 49 are possible such numbers that happens to be a square... Why can't this possibility extend to a 600 bit binary number?The answer should be YES: @gustion: your example with 49 (7 pwr2) is correct but with 25 (5 pwr2) is incorrect. 7 in binary is 111 (3 1-bits is half of 6 bits), but 5 in binary is 101 (2 1-bits does not equal half of 6 bits). In general, any binary number with n-bits, half of which are 0's and half are 1's is a square of a binary number with half the number of bits, all being 1-value bits. In addition, the number's magnitude will be n/2-1 1-bits followed by n/2 0-bits followed by the last 1-bit. For example, lets say we have a 16-bit number. The number which will have 8 1-bit and 8 0-bit binary digits and also be a square is: 1111 1110 0000 0001 (7 1-bits followed by 8 0-bits followed by 1-bit) and this number is a square of 1111 1111 Binary number with 600 bits and 300 1-bits will have a magnitude of 299 1-bits followed by 300 0-bits followed by 1-bit, and it will be a square of a 300-bit number with the magnitude of 300 1-bits.Show More ResponsesWell on a simple note, 9's binary is 1001, a 4 digit binary with two 1's and two 0's, and is a perfect square. The same analogy should also be true for any such number.can someone explain why this pattern works?Because (2^n - 1)^2 = 2^(2n) - 2 * (2^n) + 1 = 2^(2n) - 2^(n + 1) + 2^0. Such that bit n + 1 to 2n -1 will be 1, bit n to 1 will be 0, and bit 0 will be 1, which makes it n bits of 1 & n bits of 0. You can test 15^2 = 225 to understand it.

Staff Engineer at Dolby was asked...

Jan 31, 2010
 Suppose you have a device that fires an interrupt every time it fills up with 5 bits of information; how do you commit this data into a 32-bit addressable memory location, without any padding bits?3 AnswersThis was supposedly the question that sunk many a candidate. I got it using number-theory, and drawing a little block diagram, and using certain registers on the CPU.Please give a specific answer. Explain to us without using drawing or block diagram.I am assuming you stored 5 bits in a CPU register then did some "&", "|" and ">" with next 5 bits and kept count of bits or something and when got to a count of ~32., wrote to memory. Am I right? If not please suggest the correct solution.

Staff Engineer at Qualcomm was asked...

Mar 16, 2013
 Describe major issues seen with Bisted memories and how to detect/avoid these issues.2 Answerswhat is Bisted memories?BIST'ed = Built in Self Test.

Staff Engineer at Dolby was asked...

Jan 31, 2010
 How do you reverse an integer value (e.g. 1234 => 4321)2 Answerscan be done with one loop, and modular arithmeticI came up with a quicky but it has a problem, if the number ends with a "0", it wont print in the reversed number, will resort to some ugly hack thing for that. int reverseInt(int num) { int res = 0; do { res *= 10; res += (num % 10); num /= 10; } while (num > 0); return res; }

Senior Staff Engineer at Exar was asked...

Oct 12, 2011
 Explain the gcc command-line options for run-time checking of array bounds.1 Answergcc --help

Senior Staff Engineer at Exar was asked...

Oct 12, 2011
 Please describe the SONET frame structure.1 AnswerWhat does that have to do with PCIe?

Staff Software Engineer at Xilinx was asked...

Sep 28, 2012
 describe the shortest path of a graph with negative weights1 Answerif it's a DAG, then we can solve it in O(n) using topological sorting. For a general directed graph, we can use bellam ford to solve it or find a negative cycle in O(mn).

Staff Engineer at Edwards Lifesciences was asked...

Oct 16, 2012
 The interview was not coordinated and they don't have standard questions. You can easily get the interviewers off track so that they don't ask any pertinent questions.1 AnswerNot necessary
110 of 874 Interview Questions