Backend Developer Interview Questions

9,192 backend developer interview questions shared by candidates

Find minimum distance to reach destination from source, if the distance between each node is 1, then follow up question if distances between each node is different, then he asked one more follow up question ie we can make one edge distance 0 then find the minimum distance
avatar

Backend Golang Developer

Interviewed at Shiprocket

3.9
Feb 19, 2025

Find minimum distance to reach destination from source, if the distance between each node is 1, then follow up question if distances between each node is different, then he asked one more follow up question ie we can make one edge distance 0 then find the minimum distance

Take the following func in Python: def func(input1, input2): j = 0 count = 0 ret = "" i = 0 while i < len(input1): ret = ret + input1[i] if input1[i] == input2[j]: j = j + 1 if len(input2) == j ret = ret[0: (i-j)+1] + ("-" * len(input2)) j = 0 count = count + 1 i = i + 1 return ret, count For the following inputs, here's the outputs (for example only): bba, bb => --a, 2. It's like a masking function of the 2nd string inside the 1st string. The question: The function has a small bug, find an input that the function will return an incorrect ouput for it. After that, fix the bug.
avatar

Senior Backend Developer

Interviewed at Zesty

4.1
May 6, 2023

Take the following func in Python: def func(input1, input2): j = 0 count = 0 ret = "" i = 0 while i < len(input1): ret = ret + input1[i] if input1[i] == input2[j]: j = j + 1 if len(input2) == j ret = ret[0: (i-j)+1] + ("-" * len(input2)) j = 0 count = count + 1 i = i + 1 return ret, count For the following inputs, here's the outputs (for example only): bba, bb => --a, 2. It's like a masking function of the 2nd string inside the 1st string. The question: The function has a small bug, find an input that the function will return an incorrect ouput for it. After that, fix the bug.

Viewing 971 - 980 interview questions

Glassdoor has 9,192 interview questions and reports from Backend developer interviews. Prepare for your interview. Get hired. Love your job.