Programmer Analyst Intern Interview Questions

718,325 programmer analyst intern interview questions shared by candidates

* You have a data structure of integers, which can be negative, zero, or positive, and you need to support an API with two public methods, insert(int) and getmedian(). Describe a data structure you would use to support this API and describe the running time of the two methods. * Imagine you're writing a function that takes an array of integers and an integer and it needs to return true if any pair in the array sum to the 2nd argument. The array can have negative numbers, zero, or positive numbers. Describe how you would design this function and what its running time would be. I ran through the trivial n^2 solution, then modified it to an nlogn and finally to a linear solution.
avatar

Software Engineer

Interviewed at Google

4.4
Nov 7, 2009

* You have a data structure of integers, which can be negative, zero, or positive, and you need to support an API with two public methods, insert(int) and getmedian(). Describe a data structure you would use to support this API and describe the running time of the two methods. * Imagine you're writing a function that takes an array of integers and an integer and it needs to return true if any pair in the array sum to the 2nd argument. The array can have negative numbers, zero, or positive numbers. Describe how you would design this function and what its running time would be. I ran through the trivial n^2 solution, then modified it to an nlogn and finally to a linear solution.

My 30 min coding question was related to tree where all nodes were managers each node has a value which was the number of months they worked.We have to find the maximum tenure which is I remember can be calculated using the average of its child nodes.
avatar

Software Development Engineer

Interviewed at Amazon

3.5
Jan 25, 2017

My 30 min coding question was related to tree where all nodes were managers each node has a value which was the number of months they worked.We have to find the maximum tenure which is I remember can be calculated using the average of its child nodes.

(following the previous one) You got only TWO baby bottle sample. You would like to know the max height you can drop it without breaking the bottle. Let set the unit as 1 foot. And the highest height you can reach is at N feet. So how would you find the (max) safe height? (This is the one I think is kind of brain-teaser one.)
avatar

Software Development Engineer Intern

Interviewed at Amazon

3.5
Jan 28, 2012

(following the previous one) You got only TWO baby bottle sample. You would like to know the max height you can drop it without breaking the bottle. Let set the unit as 1 foot. And the highest height you can reach is at N feet. So how would you find the (max) safe height? (This is the one I think is kind of brain-teaser one.)

Viewing 401 - 410 interview questions

Glassdoor has 718,325 interview questions and reports from Programmer analyst intern interviews. Prepare for your interview. Get hired. Love your job.