Sr Software Developer Interview Questions | Glassdoor

# Sr Software Developer Interview Questions

650

Sr software developer interview questions shared by candidates

## Top Interview Questions

Sort: Relevance Popular Date

### Senior Software Development Manager at Amazon was asked...

May 4, 2010
 What would you do if senior management demanded delivery of software in an impossible deadline? 2 Answers Give them the choice of reduced scope, more resources, or changed dates. They can only pick 2. It is possible to keep scope, resources & timeline (dates) unchanged, but compromise on quality. This will impact team retention, especially the stronger engineers on the team, over the longer run. The leadership team must understand the consequences.

### Senior Software Developer at Tower Research Capital LLC was asked...

Jun 7, 2010
 Another was a puzzle: A king orders 100 bottles of wine for a celebration. A courtier who's angry with the king over something puts poison in one of those bottles. The king has a way of identifying the poisoned bottle by giving a few drops of wine to a monkey. Since the poison is fast acting, the monkey will die immediately. Whats the minimum number of monkeys needed to find the poisoned bottle? 5 Answers Assuming that there is only one poisoned bottle, then you only need one monkey- because as soon as it dies, you found the bottle. However, if there is more than one bottle, or suspicion of more than one bottle, you will need at least two monkeys. you need only one monkey since you will keep giving him wine till he dies and as soon as he's dead you know that was the bottle. I think it means we can only test once. So the minimum # of monkeys is 99, is it? Show More Responses The answer is 7. Let monkeys be numbered 1-n. Each number less than or equal to 100 can be written as a 7 bit number. Hence, bottle one(0000001) is given to monkey 1. bottle three(0000101) is given to monkeys 1 and 3 and so on. Now say monkeys 1 3 5 died, it means that the number is 0010101 which means the bottle 41 is the poison! The way it's written, it seems like one would be the answer, or perhaps considering a monkey's tolerance for wine, N = 100 / (number of drops of wine a monkey can drink before passing out)... When asked with the condition that the monkey will die some time later, i.e. not immediately, the binary number technique described by Sri Krishna is best.

### Senior Software Developer at Expedia was asked...

Apr 1, 2011
 Write a function that determines if a tree is a BST or not 3 Answers A good way to start out is to confirm the understanding of what a BST is. It's a tree where each node has 0,1, or 2 children. The left child is smaller and the right child is larger. The solution consists of traversing the tree recursively, and returning false, if the above rules are violated. True otherwise package test; public class CheckBST { static boolean isBST = false; static boolean continueCheck = true; private static void checkBST(Node root) { if (continueCheck) { Node left = root.getLeftNode(); Node right = root.getRightNode(); if (left.getValue() < root.getValue() && root.getValue() < right.getValue()) { isBST = true; if (null != left.getLeftNode() || null != left.getRightNode()) { checkBST(left); } if (null != right.getLeftNode() || null != right.getRightNode()) { checkBST(right); } } else { isBST = false; continueCheck = false; } } } public static void main(String[] args) { Node left = new Node(2, new Node(1), new Node(3)); Node right = new Node(6, new Node(9), new Node(7)); Node root = new Node(4, left, right, true); checkBST(root); System.out.println("is BST ? ::" + isBST); } } How would you validate if its not a BST because it has more than 2 children, using the recursion algo above?

### Senior Software Developer at General Motors was asked...

Mar 29, 2013
 What is the difference between a Set and a List? 2 Answers As set allows duplicate object values. A list doesn't set has unique elements (no duplicates) and is not ordered list is ordered and can contain duplicates

### Senior Software Developer at Goldman Sachs was asked...

Mar 9, 2011
 write a function to swap integers not using third int? 2 Answers IIRC, this can be done using three XOR operations: A = A xor B B = A xor B A = A xor B I believe this can be solved with simple subtraction: A = A + B B = A - B A = A - B For example, if A = 10 and B = 24: A = 10 + 24 = 34 B = 34 - 24 = 10 A = 34 - 10 = 24

### Senior Software Developer at Goldman Sachs was asked...

Apr 21, 2010
 can there be a thread without a process 2 Answers no A thread is a sub-construct of a process, so no.

### Senior Software Development Engineer at Expedia was asked...

Feb 25, 2013
 How will you implement word ladder puzzle 2 Answers Did they require you to code the answer or just describe the steps? no, just algorithm

### Senior Software Developer UI at F5 Networks was asked...

Jul 25, 2012
 Given an array & a value x, find if the array contains any 2 values whoes sum = x 2 Answers def has_sum( l, v ): # assuming more than 2 elements for i in range( len(l) ): _v = v - l[i] _l = l[0:i] + l[i+1:] if _v in _l : return True return False #include #include using namespace std; bool findIfSum(const vector &x, const int val) { vectory = x; sort(begin(y), end(y)); for (auto i = y.begin(); i != y.end(); ++i) { int diff = val - *i; if (diff < 0) return false; if (binary_search (i, y.end(), diff)) return true; } return false; }

### Senior Software Development Engineer at Amazon was asked...

Jul 3, 2012
 Given a trie and a prefix, find the word (in the trie) that starts with some subsequence of the prefix and also has the longest such subsequence. 2 Answers was this question part of the phone interview or the actual interview? It was part of the actual interview.

### Sr. Software Developer at Overstock.com was asked...

Mar 19, 2009
 A lists of questions will be sent to you as part of the pre-screen. Answering these fully and correctly is a challenge. 2 Answers You must be honest and forthright but not boastful all at the same time. If you fib you will get caught. Be prepared to do write code for a sorted binary tree. Give the "lead architect" lots of praise but don't challenge him. Ego is large. Also do not talk about J2EE/JEE. These are fighting words for him and several in Arch. They have a very strong bias. Their architecture worked for a startup but is 2 tier and needs a re-write but they are not ready to admit this yet. Teams step allover each others toes since the website code is all very tightly coupled.
110 of 650 Interview Questions