Backend Engineer Interview Questions

14,383 backend engineer interview questions shared by candidates

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.2
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.

- A technical task using THEIR django app to run django on Google App Engine. - "When I'm on facebook reading something on my wall and I click somewhere else, if I click back to come back to what I was reading, it bugs me that it's not there and it's impossible to find it. What do you think about this problem?"
Aug 10, 2016

- A technical task using THEIR django app to run django on Google App Engine. - "When I'm on facebook reading something on my wall and I click somewhere else, if I click back to come back to what I was reading, it bugs me that it's not there and it's impossible to find it. What do you think about this problem?"

Viewing 1481 - 1490 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 14,383 interview questions and reports from Backend engineer interviews. Prepare for your interview. Get hired. Love your job.