Sr Engineer Interview Questions | Glassdoor

# Sr Engineer Interview Questions

8,016

Sr engineer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

Jul 18, 2010
 Write some pseudo code to raise a number to a power.10 Answerspretty trivial...int raise(num, power){ if(power==0) return 1; if(power==1) return num; return(raise(num, power-1)*num); }double Power(int x, int y) { double ret = 1; double power = x; while (y > 0) { if (y & 1) { ret *= power; } power *= power; y >>= 1; } return ret; }Show More ResponsesIn Ruby: def power(base, power) product = 1 power.times do product *= base end product end puts "2^10 = 1024 = #{power(2,10)}" puts "2^0 = 1 = #{power(2,0)}" puts "2^1 = 2 = #{power(2,1)}"If I were an interviewer, I would ask the Aug 29, 2010 poster why he used bitwise operators, and whether he would deploy that code in a production environment, or if he merely wanted to demonstrate, for purposes of the interview, that he understands bitwise operations.Because it uses dynamic programming and is lots more efficient than your algorithm.If the power is not integer, use ln and Taylor seriesIf I'm the interviewer, none of above answers is acceptable. What if y < 0? what if y < 0 and x == 0? I'm seeing an endless recursion that will eventually overflow the stack, and the none-recursive one just simply returns 1.There is a way to do this in a logN way rather than N. function power(x, n) { if n == 1 return x; // Even numbers else if (n%2 == 0) return square( power (x, n/2)); // Odd numbers else return power(x, n-1); } This is from Programming pearls.. interesting way.small mistake function power(x, n) { if n == 1 return x; // Even numbers else if (n%2 == 0) return square( power (x, n/2)); // Odd numbers else return power(x, n-1) * x; }

Sep 6, 2010

Mar 19, 2009
 What sort would you use if you required tight max time bounds and wanted highly regular performance.6 AnswersVector sort.Guaranteed to be O(n log n) performance. No better, no worse.That is so say, a "Balanced Tree Sort" is guaranteed to be O(n log n) always.Show More ResponsesMerge sort and heapsort are always guaranteed to be n*log(n). Quicksort is usually faster on the average but can be as bad as O(n^2), although with very low probability. Heapsort also does it sorting in-place, without needing an extra buffer, like mergesort. Lastly, heapsort is much easier to implement and understand than balancing trees mentioned by earlier posts.for something like this you generally want bubble sort or insertion sort. It's not about being fast it's about being consistent. Make it do exactly the same thing every time.Use a sorting network. There's some precomputation time, but runtime will be very consistent (the only variability is branch prediction performance)

### Senior Network Engineer at CSC was asked...

Feb 7, 2014
 What are the 6 TCP flags?2 AnswersGOOGLE EMURG, RST, PSH, CWR, SYN, FIN, ACK, ECN

### Senior Software Systems Engineer - Professional Services at Aspera was asked...

Jul 5, 2012
 How would you peform an SSH connection between these two PCs. I can't give you any information on these PCs, just do it.4 AnswersCouldn't do it. Not enough information to complete.ssh into localhost ;PSimply SSH in to localhostShow More Responsesssh username@localhost A ssh server must be installed on both systems. Any PCs running Windows will require an SSH client, such as PuTTy.

### Senior Mechanical Engineer I at Northrop Grumman was asked...

Apr 26, 2014
 What has been your active role in the team process you're currently working with?1 AnswerExplained details of daily involvement, software used, level of completion of initial input received, and final deliverable.

### Senior RF Engineer at Nexius was asked...

Mar 30, 2011
 What will be the greatest contribution that you can ever make as an individual to your team1 Answercoalescing my individual knowhow with overall experience that my team has makes for a well-rounded team that knows esprit de corps and can work towards success all the times

### Senior Cyber Security Engineer at American Institutes for Research was asked...

Jul 28, 2015
 What sort of anomalies would you look for to identify a compromised system?1 AnswerI used a whiteboard to draw out a basic network architecture including security technologies like IPS/IDS, Firewalls, AV, etc, and described the type of traffic and logs I could use to identify a compromised system.