Software Engineer Entry Interview Questions

664,899 software engineer entry interview questions shared by candidates

* Describe the design of a most-recently-used list, such as the "Recent Files" menu in Microsoft Word. It has two public methods, getlist() and access(str), which retrieve the list and mark an item as accessed, respectively. The list has a maximum number of items it can hold, say 5, and it should not have duplicates. Describe the data structure used and the running time of both public methods.
avatar

Software Engineer

Interviewed at Google

4.4
Nov 7, 2009

* Describe the design of a most-recently-used list, such as the "Recent Files" menu in Microsoft Word. It has two public methods, getlist() and access(str), which retrieve the list and mark an item as accessed, respectively. The list has a maximum number of items it can hold, say 5, and it should not have duplicates. Describe the data structure used and the running time of both public methods.

You are given an n by n array filled with '0's, and you have to set randomly X number of '1's in that array. Looping and generating x random number doesn't work as you might get the same random number (especially as X gets closer to n*n, collisions will become more likely in which case you'll loop for a very long time before filling all the '1's). All positions must have the same probability to get selected, and the array might be huge.
avatar

Software Engineer

Interviewed at Google

4.4
Jan 29, 2015

You are given an n by n array filled with '0's, and you have to set randomly X number of '1's in that array. Looping and generating x random number doesn't work as you might get the same random number (especially as X gets closer to n*n, collisions will become more likely in which case you'll loop for a very long time before filling all the '1's). All positions must have the same probability to get selected, and the array might be huge.

Viewing 121 - 130 interview questions

Glassdoor has 664,899 interview questions and reports from Software engineer entry interviews. Prepare for your interview. Get hired. Love your job.