Software engineer - web developer interview questions shared by candidates
An enumerator is a class with getNextObject method. It encapsulates the container. Write an enumerator. Next, write a new enumerator called chained-enumerator which is initialized by two other enumerators. Finally, how would you make it work with N enumerators. I had to write the logic for getNextObject for the most part (and any other internal state I wanted to manage).
I was slightly taken a back initially because it sounded just too simple - but quickly gained my ground again and did pretty okay. Work yourself thru a test case first and in the end dry-run it all the way.
Second question was not really a question but a very healthy session of pair programming where I was speaking and a senior developer was coding. He chose JAVA and we were creating a list data-structure (with add, count, delete) operations. The catch was that we were going to do it TDD style. So I guided him on what kind of test we can write and how to pass that test and so on. We kept doing it and in 45 minutes we had a very well tested working list data structure.
There are 3 boxes. One has blue marbles. One has white marbles. One has both color marbles. All boxes are incorrectly labeled. Each box has a crank which dispenses exactly one marble at a time. what is the minimum number of times a crank must be turned in order to determine the correct labels for the boxes?
See Interview Questions for Similar Jobs
- Software Engineer
- Software Developer
- Software Engineer New Grad
- Software Engineer Intern
- Software Engineering
- Software Engineering Intern
- Senior Software Engineer
- Front End Engineer
- Junior Software Engineer
- Web Developer
- Software Development Engineer
- Product Manager
- Software Development Engineer I
- PHP Developer