Say we have a row of houses on a street, each with an individual value attached to it. The values are guaranteed to be >=0. The values come in an array; the index of the array represents the number of the house, the element the value of the house. (e.g. [5,0,4,6,10] - house 1 has value 5, house 2 value 0, etc.). You must now determine which houses to rob to maximize the value of goods stolen, with the caveat that you cannot rob consecutive houses, and are allowed to go back to rob a house you initially skipped. Using a language of your choice, write a function which takes in an array (as specified) and determines the maximum value of good stolen, and return that value.
Technical Program Interview Questions
45,719 technical program interview questions shared by candidates
What skill did you have to learn very quickly recently?
How would you design a spice box for the visually impaired?
How do you get work done
Find the Nth largest in a linked list without sorting and using arrays. Questions about object oriented concepts, questions on git , difference between binary tree and binary search tree etc.
Write a stack class using arrays
My biggest strength and my biggest weakness. How I handle certain situations, including handling multiple projects at once.
Why do you think you are a good fit for the company?
What degree did you study?
What's the one project (you've done so far) that you liked the most ?
Viewing 1941 - 1950 interview questions