Sr Software Developer Interview Questions

7,033 sr software developer interview questions shared by candidates

Programming task 1 (technical screening): You want to park your bicycle in a bicycle parking area where bike racks are aligned in a row. There are already N bikes parked there(each bike is attached to exactly one rack, but a rack can have multiple bikes attached to it). We call racks that already have bikes attached used. You want to park your bike in a rack in the parking area according to the following criteria: the chosen rack must lie between te first and the last used racks(inclusive); the distance between the chose rack and any other used rack is as big as possible. A description of the bikes already parked in the racks is given in a non-empty zero-indexed array A: element A[K] denotes the postion of the rack to which bike number K is attaced (for 0 <= K < N). The central position in the parking area is position 0. A positive value means that the rack is located A[K] meters to the right of the cetral position 0; a negative value means that it's located |A[K]| meters to the left. That, given a non-empty zero-indexed array A of N integers, returns the largest possible distance in meters between the chosen rack and any other used rack. Assume that: N is an integer within the range [2..100,000]; each element of array A is an integer within the range [-1,000,000,000..1,000,000,000].
avatar

Senior Software Developer

Interviewed at Moneris

3.3
Mar 4, 2020

Programming task 1 (technical screening): You want to park your bicycle in a bicycle parking area where bike racks are aligned in a row. There are already N bikes parked there(each bike is attached to exactly one rack, but a rack can have multiple bikes attached to it). We call racks that already have bikes attached used. You want to park your bike in a rack in the parking area according to the following criteria: the chosen rack must lie between te first and the last used racks(inclusive); the distance between the chose rack and any other used rack is as big as possible. A description of the bikes already parked in the racks is given in a non-empty zero-indexed array A: element A[K] denotes the postion of the rack to which bike number K is attaced (for 0 <= K < N). The central position in the parking area is position 0. A positive value means that the rack is located A[K] meters to the right of the cetral position 0; a negative value means that it's located |A[K]| meters to the left. That, given a non-empty zero-indexed array A of N integers, returns the largest possible distance in meters between the chosen rack and any other used rack. Assume that: N is an integer within the range [2..100,000]; each element of array A is an integer within the range [-1,000,000,000..1,000,000,000].

Viewing 5711 - 5720 interview questions

Glassdoor has 7,033 interview questions and reports from Sr software developer interviews. Prepare for your interview. Get hired. Love your job.