Senior Software Engineer Interview Questions in Hyderabad, India | Glassdoor

# Senior Software Engineer Interview Questions in Hyderabad, India

"Senior software engineers are the most experienced member of a software team and usually carry the most responsibility and authority of that team. Because of this, interviews will be designed to find candidates who have expert knowledge of the field and years of experience as a software engineer. Expect to be asked tough technical questions and to give examples of previous projects that you have worked on."

## Top Interview Questions

Sort: RelevancePopular Date

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

Oct 13, 2012
 You are given a fixed number of 5 rupee, 10 rupee, 20 rupee and 50 rupee stamps. Now given an amount for sending a parcel, you should design an algorithm to come out with the minimum number of stamps that should be used for attaining that amount. For example, if the parcel costed 30 rupees, it could be attained using one 20 rupee stamp and one 10 rupee stamp OR using three 10 rupee stamps OR using one 20 rupee stamp and two 5 rupee stamps OR using one 10 rupee stamp and four 5 rupee stamps OR using two 10 rupee stamps and two 5 rupee stamps. However, the minimum number of stamps is the case of one 20 rupee stamp and one 10 rupee stamp where only two stamps are used. The case where no solution is possible should also be handled, for example, a parcel amount of exactly 33 rupees cannot be attained.8 AnswersThe solution is attained using dynamic programming. The basic idea is that the minimum number of stamps used for attaining an amount x, is 1+minimum of (minimum number of stamps for attaining x-5, minimum number of stamps for attaining x-10, minimum number of stamps for attaining x-20,minimum number of stamps for attaining x-50). You can try to solve this first by assuming that an unlimited number of 5 rupee, 10 rupee, 20 rupee and 50 rupee stamps are available. And then you can take into account that only a fixed number of these stamps are available.And what is the time involved to get this done? I really liked the question.Simple to read but involves good amount of logic. I ve written down the algorithm but i believe i took more time than i initially thought i would take.I understand what the interviewer is trying to test and I know how to solve it, but what about more realistic scenario where parcel postage cost would be beyond given values like 3 units of currency or 37 units of currency.Show More ResponsesIn this specific case, dynamic programming is overkill. There's a better optimal substructure here: The stamp with greatest value less than parcel cost minus stamp values already committed minimize the total of stamps.1. find the stamp <= cost from highest stamp cost 2. num of found_stamp = found_stamp/cost, rem_stamp = found_stamp % cost 3. Do 1, then 2 until rem_stamp ==0 (done) or rem_stamp < least stamp available (not possible case)In the previous ans, after step 3 if rem_stamp !=0, go back to step 1, find next_stamp < cost (but smaller than value of found_stamp in previous iteration)i=0; boolean solPossible = false; do { if(cost % notes[i] == 0) solPossible = true; else i++; } while(!solPossible && (ivoid sendParsal(int cost) { int[] avlstm={50,20,10,5}; int i=0; while(cost>=5) { while(cost>=avlstm[i]) { System.out.println(avlstm[i]); cost=cost-avlstm[i]; } i++; } if(cost!=0) { System.out.println("Solution not possible."); } }

### Senior Software Engineer at Virtusa was asked...

Sep 19, 2010
 if there are 6 people in a team, how many handshakes will be there7 Answers15There will be 30 hand shakes. In total we have 6 people, so it will be 6 * (6-1) (i.e 1 person will shake hands with 5 people)15 A | B | C| D | E | F | A will perform 5 B will perform 4 C will perform 3 D will perform 2 E will perform 1 F ultimately hand shakes with everyoneShow More Responses6c2==6!/(2!*4!)=15lets consider A,B,c,d,e,f so a shakes hand with the other 5 ..b with oter 4 and so on so at last 5+4+3+2+1=1515 people handshakes at a time you have given 6 person first of all the peoples is arranged in row 6 number people have an 5 option for handshakes after that 6 number person out then total number of people 5 again....again....same procedure apply.......Each one will shake hand 5 times, 6x5 -> 30 times

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

Feb 20, 2012
 Probability of a knight making a valid move on NxN matrix in m steps.4 AnswersGiven in the description above.Guess what , I got almost the same question on my first interview with Google , and I was applying as a new college grad ....i also can up with a DP solution with O(64m) .... btw can you provide the link to the solution you came across ...??@mohan: I don't have a link to solution, its something I worked out on a piece of paper.Show More ResponsesBuddy, I think you thinking a bit too complicatedly. A knight on a chess board only has 8 legal moves. and if it is anywhere closer than being atleast 2 boxes from the border it will be less than 8. just take a input of all the pieces on the NxN matrix. check these 8 positions and calculate the probability

### Senior Software Engineer at Oracle was asked...

Apr 8, 2010
 You have chess board. How many squares are there in it totally?2 Answers8*8 + 7*7 + 6*6 ... 1*1total number of squares on chess board is given by recurrence relation: f(n) = f(n - 1) + n^2 f(8) = 7! + 8^2 = 140 + 64 so in total there is 204 squares... you can check this relation with smaller boards where its possible visually count squares..

### Senior Software Engineer at Oracle was asked...

Apr 8, 2010
 If there are 20 people in a tournament and each match the loser will leave the tournament then how many total matches should be played to decide the winner3 Answersit is 20-1 which is 19. Since 19 matches should be played to eliminate 19 peopleIt is n-11

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

Nov 28, 2009
 Implementing a queue with stack as the internal datastructure 2 Answersuse two stacksKeep 2 stacks, let's call them inbox and outbox. Queue: - Push the new element onto inbox Dequeue: - If outbox is empty, refill it by popping each element from inbox and pushing it onto outbox - Pop and return the top element from outbox Using this method, each element will be in each stack exactly once - meaning each element will be pushed twice and popped twice, giving amortized constant time operations.

### Senior Software Engineer at Wipro was asked...

Sep 25, 2012
 if trash can also be in the middle of the string, and you dont want to replace that2 Answersno ideaWhat's the question?

### Senior Software Engineer at Wipro was asked...

Nov 12, 2013
 None, People who interview you don't even concentrate on your answers, irritate you1 AnswerIf they are not concentrating on your answers, please ask them straight forward, "why you are not listning?"

### Senior Software Engineer at Tata Consultancy Services was asked...

Feb 8, 2010
 why did you use only SQL server 2005 in your project..why not some other DB.1 AnswerIt is what the DB admin decides after discussing with the client. IF the client needs it, we have to follow..That is what I answered him.

### Senior Software Engineer at Infosys was asked...

Feb 18, 2015
 They ask about project and question is depends on your resume and your response. They ask jsp and servlet question to me.1 AnswerI given answer for and explained every thing.
110 of 643 Interview Questions