Software engineering interview questions shared by candidates
Design a generic Linked List in Java. Follow up: given access only to the head of the list, return the middle element.
My answer was to first determine the length of the list and then go half the way. They suggested another approach, the slow and fast runner pointers. Both solutions would run in O(n) though.
See Interview Questions for Similar Jobs
- Graphic Designer
- Mechanical Engineer
- Social Worker
- Medical Assistant
- Dental Assistant
- Truck Driver
- Pharmacy Technician