Back End Developer Interview Questions

1,560 back end developer interview questions shared by candidates

1) Describe the process by which typing https://www.yahoo.com in the address bar of your browser results in the Yahoo! Homepage rendering. Please go into as much detail as possible. 2)In the context of a relational database, what is the difference between a clustered and a non-clustered index? 3) What does it mean for a task to be I/O bound vs CPU bound? a. Which of these is handled best by a multi-threaded language? Why? b. Which of these is handled best by an asynchronous language? Why? 4) In a RESTful API, what HTTP status code would you return for each of the following use cases? Why? (There may be more than one correct answer) a) Client issues a GET request for /widgets/1. Client's password is incorrect. b) Client passes credentials identifying the herself as Customer A while issuing a PUT request to /customers/B/accounts/2. Customer A should not be able to see Customer B’s accounts. c) Client issues a POST request to /products. productName is a required field, but it has not been provided. d) Client issues a PUT request to /claims/1, but once a claim is created, it cannot be modified. 5) An API consumer sends a request with the following header: Authorization: Basic dXNlcjpwYXNzd29yZA==. Why would a client send a request with this header? What does it mean? 6) Write a program to simulate picking a marble out of a bag of colored marbles without replacement (marbles are not added back to the bag after selecting them). Your program should at the minimum have the following two functions: initializeBagand selectMarble. Assume we have 3 colors: red, green, and blue, each with the following respective quantities: 100, 200, and 300. Your program should initialize the bag, select a marble, print out the color of the marble selected, and continue to do so until the bag is empty. a) What is the runtime complexity of your method to initialize the bag? b) What is the runtime complexity of your marble selection method? c) What is the space complexity of your program? d) How would you change your program, if at all, if you had on the order of 2^128 of each color marble? What is the new runtime complexity of selectMarble? e) How would you change your program, if at all, if you had 2^128 colors of marbles? What is the new runtime complexity of select marble? 7) Write a program to generate the n-th number in the look-and-say sequence (https://en.wikipedia.org/wiki/Look-and-say_sequence). Constraint: Your inputs and outputs must all be integers. You can only use arithmetic functions and operators (add, subtract, multiply, divide, remainder, modulo, log, power, square root, bitwise operators, etc.... ). You cannot use any string, character, or array methods, etc... 8) Please review the following code. a) What comments would you provide? b) How would you rewrite this code, if at all? 1 var AddressValidationFailure = require('database/addressValidationFailure'); 2 3 4 var saveAddressValidationFailureMessages = function(messages, orderID, addressInfo) { 5 var message = null; 6 var keyPhrases = { 7 'address1 length exceeds limit': 'invalid address1', 8 'address2 length exceeds limit': 'invalid address2', 9 'you must provide a city': 'invalid city', 10 'city and state do no match zip code': 'invalid city, state, or zip code', 11 'invalid zip code': 'invalid zip code', 12 }; 13 14 15 messages.forEach(saveRelevantMessagesOnly); 16 17 18 function saveRelevantMessagesOnly(msg) { 19 message = msg; Object.keys(keyPhrases).some(comparePhraseToMessageAndSave); 20 } 21 22 23 function comparePhraseToMessageAndSave(phrase) { 24 if (message.indexOf(phrase) > -1) { 25 var reason = keyPhrases[phrase]; 26 var failure = AddressValidationFailure.buildValidationFailure(orderID, reason, addressInfo); 27 AddressValidationFailure.create(failure) 28 .catch(function(reason) { 29 var warning = "Failed to persist address validation failure for " + 30 "Order ID " + orderID + " for the following reason: " + reason; 31 console.log(warning); 32 }); return true; 33 } 34 } 35 }
avatar

Junior Back-end Engineer

Interviewed at Try The World

3.5
Nov 29, 2016

1) Describe the process by which typing https://www.yahoo.com in the address bar of your browser results in the Yahoo! Homepage rendering. Please go into as much detail as possible. 2)In the context of a relational database, what is the difference between a clustered and a non-clustered index? 3) What does it mean for a task to be I/O bound vs CPU bound? a. Which of these is handled best by a multi-threaded language? Why? b. Which of these is handled best by an asynchronous language? Why? 4) In a RESTful API, what HTTP status code would you return for each of the following use cases? Why? (There may be more than one correct answer) a) Client issues a GET request for /widgets/1. Client's password is incorrect. b) Client passes credentials identifying the herself as Customer A while issuing a PUT request to /customers/B/accounts/2. Customer A should not be able to see Customer B’s accounts. c) Client issues a POST request to /products. productName is a required field, but it has not been provided. d) Client issues a PUT request to /claims/1, but once a claim is created, it cannot be modified. 5) An API consumer sends a request with the following header: Authorization: Basic dXNlcjpwYXNzd29yZA==. Why would a client send a request with this header? What does it mean? 6) Write a program to simulate picking a marble out of a bag of colored marbles without replacement (marbles are not added back to the bag after selecting them). Your program should at the minimum have the following two functions: initializeBagand selectMarble. Assume we have 3 colors: red, green, and blue, each with the following respective quantities: 100, 200, and 300. Your program should initialize the bag, select a marble, print out the color of the marble selected, and continue to do so until the bag is empty. a) What is the runtime complexity of your method to initialize the bag? b) What is the runtime complexity of your marble selection method? c) What is the space complexity of your program? d) How would you change your program, if at all, if you had on the order of 2^128 of each color marble? What is the new runtime complexity of selectMarble? e) How would you change your program, if at all, if you had 2^128 colors of marbles? What is the new runtime complexity of select marble? 7) Write a program to generate the n-th number in the look-and-say sequence (https://en.wikipedia.org/wiki/Look-and-say_sequence). Constraint: Your inputs and outputs must all be integers. You can only use arithmetic functions and operators (add, subtract, multiply, divide, remainder, modulo, log, power, square root, bitwise operators, etc.... ). You cannot use any string, character, or array methods, etc... 8) Please review the following code. a) What comments would you provide? b) How would you rewrite this code, if at all? 1 var AddressValidationFailure = require('database/addressValidationFailure'); 2 3 4 var saveAddressValidationFailureMessages = function(messages, orderID, addressInfo) { 5 var message = null; 6 var keyPhrases = { 7 'address1 length exceeds limit': 'invalid address1', 8 'address2 length exceeds limit': 'invalid address2', 9 'you must provide a city': 'invalid city', 10 'city and state do no match zip code': 'invalid city, state, or zip code', 11 'invalid zip code': 'invalid zip code', 12 }; 13 14 15 messages.forEach(saveRelevantMessagesOnly); 16 17 18 function saveRelevantMessagesOnly(msg) { 19 message = msg; Object.keys(keyPhrases).some(comparePhraseToMessageAndSave); 20 } 21 22 23 function comparePhraseToMessageAndSave(phrase) { 24 if (message.indexOf(phrase) > -1) { 25 var reason = keyPhrases[phrase]; 26 var failure = AddressValidationFailure.buildValidationFailure(orderID, reason, addressInfo); 27 AddressValidationFailure.create(failure) 28 .catch(function(reason) { 29 var warning = "Failed to persist address validation failure for " + 30 "Order ID " + orderID + " for the following reason: " + reason; 31 console.log(warning); 32 }); return true; 33 } 34 } 35 }

- HR interview: Pretty standard behavioral questions. Had a great conversation with the hiring manager, who was really nice. - Technical test: Doesn't take much time to complete and it was actually very relevant to the role and the skills required.
avatar

Junior Back End Developer

Interviewed at Heyday AI

4.4
Sep 15, 2020

- HR interview: Pretty standard behavioral questions. Had a great conversation with the hiring manager, who was really nice. - Technical test: Doesn't take much time to complete and it was actually very relevant to the role and the skills required.

Viewing 801 - 810 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 1,560 interview questions and reports from Back end developer interviews. Prepare for your interview. Get hired. Love your job.