Lead Backend Developer Interview Questions

12,385 lead backend developer interview questions shared by candidates

Given m tasks for n threads, and the position k of a thread within those n. Find maximum number of task that can be given to k-th thread, by respecting two rules: each thread has at least one task + adjacent threads differ by no more than one task count.
avatar

Senior Java Backend Developer

Interviewed at Diabolocom

4.1
Sep 4, 2024

Given m tasks for n threads, and the position k of a thread within those n. Find maximum number of task that can be given to k-th thread, by respecting two rules: each thread has at least one task + adjacent threads differ by no more than one task count.

/* Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. Example 1: Input: intervals = [[1,3],[8,10],[15,18],[2,6]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlap, merge them into [1,6]. Example 2: Input: intervals = [[1,4],[4,5]] Output: [[1,5]] Explanation: Intervals [1,4] and [4,5] are considered overlapping. */ ---------------------------------------------------------- Implement Jwt middlewear const jwt = require('jsonwebtoken') function authenticate(req, res, next) { jwt.verify(req.headers, (data) => { // data.user { } }) next() } function generateToken() { jwt.sign(userdata, algo, secret_key, (data) => { // token }) return token } ---------------------------------------------------------- //Suppose you need to build a scalable API for processing high-volume data uploads from multiple sources. How would you design the system using Node.js and PostgreSQL? let temp =fs.createReadStream() // temp.on('chunk', (chunk) => { // }) multer diskStorage -> middlewear ---------------------------------------------------------- Second highest salary SELECT MAX(salary) from salary where salary <> ( SELECT MAX(salary) from salary ) ---------------------------------------------------------- What is Closure, write code to demonstrate it Difference b/w var and let Is Nodejs single threaded ? How does it handle async operations ? Eventloop Promise vs Callbacks Challenges faced while converting from monolithic to microservices (data inconsistency) Questions on caching and redis In microservices if a single service goes down then how to deal with it ---------------------------------------------------------- Round 2 ---------------------------------------------------------- Questions on my past work, challenges faced, how did I tackle it, is there any better way to do it In a distributed system how to handle eventual data inconsistency Coding: create a node js app with 2 endpoints, 1 return straightforward response, other performs heavy calculations like fibonacci How to ensure performance and NodeJS's "non blocking" in such scenario
avatar

Senior Backend Engineer

Interviewed at INTEGRTR

4.6
Sep 21, 2025

/* Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. Example 1: Input: intervals = [[1,3],[8,10],[15,18],[2,6]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlap, merge them into [1,6]. Example 2: Input: intervals = [[1,4],[4,5]] Output: [[1,5]] Explanation: Intervals [1,4] and [4,5] are considered overlapping. */ ---------------------------------------------------------- Implement Jwt middlewear const jwt = require('jsonwebtoken') function authenticate(req, res, next) { jwt.verify(req.headers, (data) => { // data.user { } }) next() } function generateToken() { jwt.sign(userdata, algo, secret_key, (data) => { // token }) return token } ---------------------------------------------------------- //Suppose you need to build a scalable API for processing high-volume data uploads from multiple sources. How would you design the system using Node.js and PostgreSQL? let temp =fs.createReadStream() // temp.on('chunk', (chunk) => { // }) multer diskStorage -> middlewear ---------------------------------------------------------- Second highest salary SELECT MAX(salary) from salary where salary <> ( SELECT MAX(salary) from salary ) ---------------------------------------------------------- What is Closure, write code to demonstrate it Difference b/w var and let Is Nodejs single threaded ? How does it handle async operations ? Eventloop Promise vs Callbacks Challenges faced while converting from monolithic to microservices (data inconsistency) Questions on caching and redis In microservices if a single service goes down then how to deal with it ---------------------------------------------------------- Round 2 ---------------------------------------------------------- Questions on my past work, challenges faced, how did I tackle it, is there any better way to do it In a distributed system how to handle eventual data inconsistency Coding: create a node js app with 2 endpoints, 1 return straightforward response, other performs heavy calculations like fibonacci How to ensure performance and NodeJS's "non blocking" in such scenario

Viewing 8231 - 8240 interview questions

Glassdoor has 12,385 interview questions and reports from Lead backend developer interviews. Prepare for your interview. Get hired. Love your job.