Software Developer Interview Questions in New York City, NY | Glassdoor

# Software Developer Interview Questions in New York City, NY

"Software developers design, write, test, and maintain the code for a software system. Extensive knowledge of programming languages, data structures, and algorithms are necessary to pass the technical interview which is designed to test these skills. Employers are looking for candidates with a bachelor's degree in computer science or related field or equivalent work experience. "

## Top Interview Questions

Sort: RelevancePopular Date

Oct 1, 2010

Feb 15, 2010

May 17, 2010

### Financial Software Developer at Bloomberg L.P. was asked...

Jun 28, 2012
 Say I have a deck of 52 cards, regular deck of cards. I put a joker in the deck somewhere and shuffle it up. Now I start dealing you cards until the joker shows up. Once it shows up, I stop dealing you cards. What is the probability that you have, in your set of cards, all 4 aces?10 Answers20%The joker shows up at the nth position. Then the answer is 1 - Probability of getting one ace in (n-1) cards.4/53Show More Responsessum (i+1)(i+2)(i+3)(i+4)/ (53*52*51*50*49) from i =0 to 48 we got 1/240 ~ 0.00416666...it should be a function of the position of jokerGuys!! the 0.2 is the correct answer. Actually I have come across an even tougher question based on this one. it asked what is the expected number of pokers that you have delivered when you dealing all 4 Aces out.It's a hyper-geometric distribution. There is no single answer since the probability of having all 4 aces depends on how many cards were chosen. If all cards were chosen, the probability of you having all four aces is 1. So just make an expression with n equal to the amount of draws from the deck until reaching joker. This is what I got. (49 C (n-4)) / (53 C n)Select 5 positions from the 53 cards; assign the 4 aces to the first 4 positions, and the joker to the 5th position. The 4 aces and the rest 48 cards can have full permutations. The probability is C(53,5)*4!*48!/53!=0.2You are complicating it too much... There are 5 cards... 4 ACes and 1 Joker. and there are 5 places.. What is the probability that joker occupies the 5th place? It is 1/5 = 20%I dont think the answer is 20%. You could get joker on the 5th card or on the 49th card.So the chance of joker occupying the 5th place is 1/5 , occupying sixth place is 1/6 and so on till the joker occupies 49th place is 1/49 .. this sum 1/5+1/6+...+1/49 will give u the answer. correct me if i'm wrong...

### Software Developer at D. E. Shaw & Co. - Investment Firm was asked...

Nov 3, 2010
 You are in a room with 100 lights, initially all off. If you first toggle every light, then every second, and so forth up to 100, which lights will be on at the end?10 AnswersThe ones with prime numbered indicesThe numbers which are whole squares, shall be ON and the rest OFFAt some point, you are toggling every 50th light, every 60th light, etc. Unless I'm missing the point of the question...when you are 'at the end' you will toggle 'every 100th light'. So, only the last light will be on. Or maybe I'm wrong...but it seems fairly easyShow More ResponsesAssuming 1-based indices, the lights with indices that are squares will remain on at the end. The longer answer is that the lights with an odd number of factors (including 1 and itself) will remain on. These are all numbers N that are squares since for each factor n_i <= sqrt(N), there exists a corresponding factor N / n_i, which is different than n_i, EXCEPT for sqrt(N). Therefore making the number of factors odd.the numbers that have odd numbers of divisors (including 1) which is whole square numbersJust looking at numbers 1-9 easily illustrates that the numbers that are perfect squares will be on. 123456789 1X3X5X7X9 1XXX567XX 1XX45678X 1XX4X678X 1XX4XX78X 1XX4XXX8X 1XX4XXXXX 1XX4XXXX9Of course, n^2 will be on.All numbers that have whole numbers as the square root.Squares of prime number will be ON.perfect squares

### Financial Software Developer Intern at Bloomberg L.P. was asked...

Apr 17, 2012
 There are 20 floors in a building. If you're on an elevator and you're trying to get to the 20th floor, what is the probability that 4 people ahead of you click the 20th floor before you do? Assuming you click last.10 Answersassume there is one button for each floor, so 20 buttons. a person can press any 1 button out of the 20, prob is 1/20. Since there are 4 people, so1/16000These are independent events so the chances of one person before you going to the 20th floor is 1/20. Since this happens 4 times before you the probability is 4*(1/20) or 1/5.The above two are close, but wrong.. There are 20 buttons, thus 20 choices, sure. But you are getting on at one of the floor. No body will press the button for the floor they get on.. Thus, there is really only 19 choices. P = (1/19)^3 (Independent events mean (1/19)(1/19)(1/19)).Show More Responses1/19 + 1/18 + 1/17 + 1/16 assuming that there were no repeated destinations.based on question: P(all 4 ahead of you want to get off on 20th fl) = (1/19)^4 real life(all 4 want to get off on 20th fl, and one of them is the first person press the button to 20th fl, and that leave all others, including you, stay still): (1/19) * (1/4)about 20% is the right answer. I am surprised with some of the answers, they are all very small possibilities (some less than 1%).I'm quite sure you are all wrong: The real probability is 1 - P(nobody pushes 20) = 1 - (18/19)^3 = 15%1- (19/20)^4If one of the 4 press the button for the 20th floor then the others won't have to do anything. The chances of one of them pressing 20th is: 1/19 + 1/19 + 1/19 + 1/19 = 4/19The answer is 1-(19/20)^4

### Financial Software Developer at Bloomberg L.P. was asked...

Nov 15, 2010
 Puzzle1 - Given 8 coins, and the fact that one of the coins is heavier than the other, how many times(min) do you need to use a beam balance to figure out which is the anomalous coin? After I answered this, he made it little tougher. Given 9 coins and one anomalous coin(maybe heavier or lighter), figure out which coin it is and whether heavier or lighter. What is the min no of comparisons? This is where i took a while to answer.5 Answers3 times. split 8 coins into 3,3 and 2. Compare the two 3 coin blocks. If they are equal, compare the 2 left over coins. else, pick the heavier 3 coin stack and do one more weighing. puzzle ans 2: split it into 3 groups of 3. Build it from here...You need 2 weighings to find heavier coin out of 8 coins and 3 weightings to find biased coin out of 9.The above answers are wrong. The answers only apply if you know in advance whether the coin is heavier or lighter. The answers do not work if you do not know if the coin is heavier or lighter.Show More Responsesfind 1 heavier amongst 8 coins: split 3 / 3 /2 and balance 3 /3. -if there is 1group heavier take the group of 3 and split the group in 3 groups of 1coin. blance 1/1: --if it is balanced then the third coin is heavier -- if it is not you found the heavier -if the 2 groups of 3 weight the same then check the balance between the 2 remaining coins... 2measurements!to find 1 biaised coin amongst 9: split into 3 groups A, B, C of 3 coins each. check the balance between between A and B. then check the balance between A and C. you can now know if the coin is lighter or heavier and what is his group. just find the heavier(or lighter) coin amongst the 3 coins of the group. 3 weightings

Dec 8, 2012