Backend Engineer Interview Questions

14,349 backend engineer interview questions shared by candidates

I think this is a short time to complete these two questions in a decent manner that shows my coding abilities. Home assignment questions: First question - given a list/array of integers, return a list of sums of the factors of each integer. The trivial solution is not good enough since there were test cases that checked execution time. Second question- connect to a given URL (with a simple query param to get as an input) get in return a huge json, from which you need a single value for an internal json object within that json.
avatar

Backend Engineer

Interviewed at Orca Security

4.1
Aug 18, 2022

I think this is a short time to complete these two questions in a decent manner that shows my coding abilities. Home assignment questions: First question - given a list/array of integers, return a list of sums of the factors of each integer. The trivial solution is not good enough since there were test cases that checked execution time. Second question- connect to a given URL (with a simple query param to get as an input) get in return a huge json, from which you need a single value for an internal json object within that json.

Q. 1 Coding Test: Platform used for coding test: https://codeinterview.io/ Ryan Dahls github url is https://github.com/ry . Github provides information about his public commits in JSON format at https://api.github.com/users/ry/events/public . In the JSON data there is an attribute called "type" which denotes what kind of commit it was. Let's say that we give following score to Ryan Dahl based on the "type" of the commit IssuesEvent = 7 IssueCommentEvent = 6 PushEvent = 5 PullRequestReviewCommentEvent = 4 WatchEvent = 3 CreateEvent = 2 Any other event = 1 Write a nodejs program which when executed prints the score of https://github.com/ry . The answer printed on the terminal should be like this. 'Ryan Dahls github score is XXX' Calculate the score based on the item results returned only from first page of that API call. Do not worry about pagination.
avatar

Senior Backend Engineer

Interviewed at Heady

4.4
Jan 22, 2021

Q. 1 Coding Test: Platform used for coding test: https://codeinterview.io/ Ryan Dahls github url is https://github.com/ry . Github provides information about his public commits in JSON format at https://api.github.com/users/ry/events/public . In the JSON data there is an attribute called "type" which denotes what kind of commit it was. Let's say that we give following score to Ryan Dahl based on the "type" of the commit IssuesEvent = 7 IssueCommentEvent = 6 PushEvent = 5 PullRequestReviewCommentEvent = 4 WatchEvent = 3 CreateEvent = 2 Any other event = 1 Write a nodejs program which when executed prints the score of https://github.com/ry . The answer printed on the terminal should be like this. 'Ryan Dahls github score is XXX' Calculate the score based on the item results returned only from first page of that API call. Do not worry about pagination.

Given the following code: class Asset { id: string; companyId: string; body: any; public equals(asset: Asset): boolean { return this.companyId == asset.companyId && this.id == asset.id; } } const diffUpdateAssets = (apiAssets: Asset[], dbAssets: Asset[]): Asset[] => { return apiAssets.filter( (asset: Asset) => dbAssets.find(asset.equals) ); }; const diffInsertAssets = (apiAssets: Asset[], dbAssets: Asset[], Map map): Asset[] => { return apiAssets.filter( (asset: Asset) => !dbAssets.find(asset.equals) ); }; const diffDeleteAssets = (apiAssets: Asset[], dbAssets: Asset[]): Asset[] => { return dbAssets.filter( (asset: Asset) => !apiAssets.find(asset.equals) ); }; export const syncAssets = (apiAssets: Asset[], dbAssets: Asset[]) => { return { toInsert: diffInsertAssets(apiAssets, dbAssets), toDelete: diffDeleteAssets(apiAssets, dbAssets), toUpdate: diffUpdateAssets(apiAssets, dbAssets), }; }; 1. Explain what the above code does. What's the time complexity of the code. How it can be improved? how this can be imporved. 2. Simple subquery / inner query SQL question, just learn sub queries. 3. Design question: All of our integrations in DoControl are based on webhooks notifications from the SaaS providers. In order to process those messages we perform a registration of our predefined POST webhook endpoint that will accept those events. Please plan a basic flow which will: a. Receive message from Google Drive b. Enrich its data with an api call performed per each event c. Insert the enriched record to a database.
avatar

Senior Backend Engineer

Interviewed at DoControl

4.7
Jun 5, 2023

Given the following code: class Asset { id: string; companyId: string; body: any; public equals(asset: Asset): boolean { return this.companyId == asset.companyId && this.id == asset.id; } } const diffUpdateAssets = (apiAssets: Asset[], dbAssets: Asset[]): Asset[] => { return apiAssets.filter( (asset: Asset) => dbAssets.find(asset.equals) ); }; const diffInsertAssets = (apiAssets: Asset[], dbAssets: Asset[], Map map): Asset[] => { return apiAssets.filter( (asset: Asset) => !dbAssets.find(asset.equals) ); }; const diffDeleteAssets = (apiAssets: Asset[], dbAssets: Asset[]): Asset[] => { return dbAssets.filter( (asset: Asset) => !apiAssets.find(asset.equals) ); }; export const syncAssets = (apiAssets: Asset[], dbAssets: Asset[]) => { return { toInsert: diffInsertAssets(apiAssets, dbAssets), toDelete: diffDeleteAssets(apiAssets, dbAssets), toUpdate: diffUpdateAssets(apiAssets, dbAssets), }; }; 1. Explain what the above code does. What's the time complexity of the code. How it can be improved? how this can be imporved. 2. Simple subquery / inner query SQL question, just learn sub queries. 3. Design question: All of our integrations in DoControl are based on webhooks notifications from the SaaS providers. In order to process those messages we perform a registration of our predefined POST webhook endpoint that will accept those events. Please plan a basic flow which will: a. Receive message from Google Drive b. Enrich its data with an api call performed per each event c. Insert the enriched record to a database.

Viewing 331 - 340 interview questions

See Interview Questions for Similar Jobs

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