Software Engineer Interview Questions

466,387 software engineer interview questions shared by candidates

Recently I attended the interview at Google and I was asked "You are given a sorted list of disjoint intervals and an interval, e.g. [(1, 5), (10, 15), (20, 25)] and (12, 27). Your task is to merge them into a sorted list of disjoint intervals: [(1, 5), (10, 27)]."
avatar

Software Engineer, Google Fiber

Interviewed at Google

4.4
Sep 12, 2012

Recently I attended the interview at Google and I was asked "You are given a sorted list of disjoint intervals and an interval, e.g. [(1, 5), (10, 15), (20, 25)] and (12, 27). Your task is to merge them into a sorted list of disjoint intervals: [(1, 5), (10, 27)]."

one question was as under - "Symmetric Difference of Arrays" Input: two arrays of integers Output: one array of integers which occur in only one (not both) arrays Test case: Input: [ 1, 7, 8, 2, 4, 5 ] [ 3, 5, 1, 7, 6, 9 ] Output: [ 8, 2, 4, 3, 6, 9 ]
Apr 15, 2014

one question was as under - "Symmetric Difference of Arrays" Input: two arrays of integers Output: one array of integers which occur in only one (not both) arrays Test case: Input: [ 1, 7, 8, 2, 4, 5 ] [ 3, 5, 1, 7, 6, 9 ] Output: [ 8, 2, 4, 3, 6, 9 ]

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.
avatar

Senior Software Engineer

Interviewed at Amazon

3.5
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.

Viewing 191 - 200 interview questions

Glassdoor has 466,387 interview questions and reports from Software engineer interviews. Prepare for your interview. Get hired. Love your job.