Associate software engineer interview questions shared by candidates
They had two coding exercises at the end. First was a warm up: reverse a string. i.e. "hello" should be "olleh" Second was pretty much the same exercise that was given here. You have ONE row of seats (single array) and you want to find the best one (best being the seat with the MOST empty seats at both the left and the right of it).
1) To reverse a string, they want you to use StringBuilder. Unlike using String variables which are immutable and create new String objects for every bit of manipulation (which is bad for memory allocation), StringBuilder takes the existing string object and modifies it without creating new ones, saving memory. In Java, there is a reverse() function, but they want you to do it without it. 2) Single array, iterated via for loop. True is filled false is vacant. If false, check seats to the left -- if any are false, add to leftCount. Same for the right side. leftCount plus rightCount equals total. Return the seat with the largest total.
Loop through the array, skipping taken seats, count empty seats left (reverse loop from current seat), count empty seats right (loop from current seat). I would also add a bonus if the seat has empty seats to immediate left and right of it.
Basic OOP question: What are the 4? What is a constructor? Took apart my resume and asked me random questions about different languages and how I used them etc.
See Interview Questions for Similar Jobs
- Software Engineer
- Software Developer
- Senior Software Engineer
- Software Development Engineer
- Software Engineer Intern
- Business Analyst
- Java Developer
- Applications Developer
- Software Engineer I
- Data Analyst
- Junior Software Engineer
- Systems Engineer
- Software Engineering
- Technology Analyst