Backend Developer

filter-iconFilter interviews by

300+ Backend Developer Interview Questions and Answers

Updated 21 Feb 2025

Popular Companies

search-icon

Q51. What are the different authentication methods used in applications ?

Ans.

Different authentication methods include OAuth, JWT, Basic Auth, and OAuth2.

  • OAuth: Allows third-party applications to access resources without sharing credentials.

  • JWT (JSON Web Tokens): Securely transmit information between parties as a JSON object.

  • Basic Auth: Sends user credentials in the header of each request.

  • OAuth2: Authorization framework that enables a third-party application to obtain limited access to an HTTP service.

Q52. On a scale from 1 to 10, how would you rate your proficiency in data structures and algorithms?

Ans.

I would rate my proficiency in data structures and algorithms as an 8.

  • I have a strong understanding of common data structures like arrays, linked lists, trees, and graphs.

  • I am proficient in implementing algorithms like sorting, searching, and dynamic programming.

  • I have experience solving algorithmic problems on platforms like LeetCode and HackerRank.

Q53. 3) Write a code to create Models to connect to the Database

Ans.

Code to create Models for connecting to a Database

  • Define a class for each table in the database

  • Use ORM frameworks like Sequelize or Django ORM for easier database connectivity

  • Specify the table name, columns, and their data types in the model

  • Define relationships between models using foreign keys or associations

  • Implement CRUD operations in the models to interact with the database

Q54. Find the elements who's occurence more than one. find the even and odd index element in array using java8.

Ans.

Using Java 8, find elements with occurrence more than one and separate even and odd index elements in an array of strings.

  • Use Java 8 streams to group elements by their occurrence count and filter out those with count greater than one.

  • Use Java 8 streams to filter elements at even and odd indexes in the array.

Are these interview questions helpful?

Q55. Design a ArrayList that supprorts all the existing funtions of a list plus getMax functionality also.

Ans.

Design an ArrayList with getMax functionality.

  • Create a custom ArrayList class that extends the existing ArrayList class.

  • Add a getMax() method that returns the maximum value in the list.

  • Override the add() method to keep track of the maximum value in the list.

  • Update the maximum value whenever an element is added or removed from the list.

Q56. Print Kaprekar number series of a given input

Ans.

Print Kaprekar number series of a given input

  • A Kaprekar number is a number whose square can be split into two parts that add up to the original number

  • Loop through the range of numbers and check if it is a Kaprekar number

  • Print the Kaprekar numbers found

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q57. SQL Design: There are multiple trains travelling between multiple stations, write a query to find the number of trains between 2 given station.

Ans.

Query to find number of trains between 2 given stations in SQL design.

  • Use a JOIN statement to join the tables containing train and station information.

  • Filter the results based on the given stations.

  • Count the number of trains in the result set.

  • Consider the direction of travel and the order of the stations in the query.

  • Handle cases where there are no trains between the given stations.

Q58. why did you choose the flask over the django and fastapi?

Ans.

I chose Flask over Django and FastAPI due to its simplicity, flexibility, and ease of use for smaller projects.

  • Flask is lightweight and minimalistic, making it easier to set up and use for smaller projects.

  • Flask allows for more flexibility in terms of project structure and customization compared to Django.

  • Flask is well-suited for rapid prototyping and smaller applications where simplicity is key.

  • Django, on the other hand, is more feature-rich and better suited for larger, mor...read more

Backend Developer Jobs

Cloud Backend Developer 8-12 years
IBM India Pvt. Limited
4.0
Hyderabad / Secunderabad
Back-end Developer 2-5 years
IBM India Pvt. Limited
4.0
Pune
Backend Developer 1-3 years
IBM India Pvt. Limited
4.0
Bangalore / Bengaluru

Q59. 1. What is thread ? 2. What is finally keywords? 3. When finally keywords is not executed ? 4.what is api ? 5.What is case in DBMS ?

Ans.

Backend Developer interview questions on threads, finally keywords, APIs, and DBMS cases.

  • Thread is a lightweight process that can run concurrently with other threads.

  • Finally keyword is used in try-catch block to execute code after try and catch blocks.

  • Finally block is not executed when the program terminates abnormally, such as with System.exit() or an uncaught exception.

  • API stands for Application Programming Interface, which allows different software applications to communic...read more

Q60. what are the design patterns you have used and explain them within your project context

Ans.

I have used the Singleton, Factory, and Observer design patterns in my projects.

  • Singleton pattern: Used to ensure a class has only one instance and provides a global point of access to it. For example, I implemented a Logger class as a Singleton to manage logging throughout the application.

  • Factory pattern: Used to create objects without specifying the exact class of object that will be created. For instance, I used a Factory pattern to create different types of database conne...read more

Q61. In which scenario does a particular design pattern hold good?

Ans.

Design patterns hold good in scenarios where a common problem needs to be solved in a reusable and maintainable way.

  • Design patterns provide solutions to recurring problems in software development

  • They promote code reusability and maintainability

  • They are applicable in various scenarios such as object creation, behavior control, and communication between objects

  • Examples of design patterns include Singleton, Factory, Observer, and Decorator

Q62. How do you approach solving a large problem within a limited timeframe?

Ans.

I break down the problem into smaller tasks, prioritize them, and focus on the most critical aspects first.

  • Break down the problem into smaller, more manageable tasks

  • Prioritize tasks based on importance and impact

  • Focus on critical aspects first to ensure progress

  • Regularly reassess and adjust the plan as needed

Q63. Find the largest Jumping number less than the given number (Java live coding)

Ans.

Find the largest Jumping number less than the given number in Java.

  • Create a function to check if a number is a Jumping number.

  • Iterate from the given number to 0 and find the largest Jumping number.

  • Return the largest Jumping number found.

Q64. What are the steps to connect PostgreSQL to Django?

Ans.

Steps to connect PostgreSQL to Django

  • Install psycopg2 package using pip

  • Update DATABASES setting in Django settings.py file

  • Specify database name, user, password, host, and port in settings.py

  • Run migrations to create necessary database tables

  • Test the connection by running Django server

Q65. why we need autowired annotation when we have new keywordto create object

Ans.

Autowired annotation is used in Spring framework for dependency injection, while new keyword is used for manual object creation.

  • Autowired annotation is used for dependency injection in Spring framework, allowing objects to be automatically wired together without manual instantiation.

  • Using new keyword for object creation leads to tight coupling and makes the code harder to maintain and test.

  • Autowired annotation promotes loose coupling and better separation of concerns in the c...read more

Q66. 1. Implement queue using stack 2. Remove duplicates from a linked list

Ans.

Implement queue using stack & remove duplicates from linked list

  • To implement queue using stack, we need to maintain two stacks. One for enqueue operation and another for dequeue operation.

  • To remove duplicates from a linked list, we can use a hash table to keep track of visited nodes and remove duplicates as we traverse the list.

  • Alternatively, we can use two pointers to compare each node with all subsequent nodes and remove duplicates.

Q67. what is orm and odm , explain in detail about promises , explain about nodejs working and artitecture of an application

Ans.

ORM is Object-Relational Mapping and ODM is Object-Document Mapping. Promises are a way to handle asynchronous operations. Node.js is a runtime environment for executing JavaScript code on the server-side.

  • ORM maps objects to relational databases, while ODM maps objects to document databases.

  • Promises are used to handle asynchronous operations and avoid callback hell.

  • Node.js is event-driven and non-blocking, allowing for scalable and efficient applications.

  • Node.js follows a mod...read more

Q68. What is your understanding of middleware, and can you explain its functionalities in depth?

Ans.

Middleware is software that acts as a bridge between different applications or components, providing communication and data processing capabilities.

  • Middleware facilitates communication between different software components or applications

  • It can handle tasks such as data transformation, security, logging, and error handling

  • Examples of middleware include web servers, message brokers, and API gateways

Q69. What is your approach for Heavy Data Handling ?

Ans.

My approach for Heavy Data Handling involves optimizing database queries, using indexing, caching, and implementing efficient algorithms.

  • Optimizing database queries by using proper indexing and avoiding unnecessary joins

  • Implementing caching mechanisms to reduce the load on the database

  • Using efficient algorithms for data processing and manipulation

  • Batch processing large datasets to minimize resource usage

  • Implementing data partitioning and sharding for scalability

  • Utilizing para...read more

Q70. 2 dsa problems 1. Reverse a singly linked list 2. Find pairs in an array which sums to given sum

Ans.

Two common DSA problems - reversing a singly linked list and finding pairs in an array that sum to a given value.

  • To reverse a singly linked list, iterate through the list and change the direction of the pointers.

  • To find pairs in an array that sum to a given value, use a hash table to store the difference between the target sum and each element in the array, then check if any subsequent elements match the stored differences.

  • Both problems have time complexity of O(n).

Q71. 2) Write a code to find maximum letter existing in given word

Ans.

Code to find maximum letter in a given word

  • Iterate through the word and keep track of the count of each letter using a dictionary

  • Find the maximum count and return the corresponding letter

  • Handle cases where multiple letters have the same maximum count

Q72. What is the process for printing a star pattern in programming?

Ans.

Printing a star pattern involves using loops to display a specific pattern of stars.

  • Use nested loops to control the number of rows and columns in the pattern

  • Use conditional statements to determine when to print a star or a space

  • Experiment with different loop structures to create various star patterns

Q73. latest project explanation with application architecture, tech stack used. Business logic implemented

Ans.

Developed a web application for online shopping with microservices architecture using Node.js, Express, MongoDB, and React.

  • Implemented microservices architecture to improve scalability and maintainability

  • Used Node.js and Express for backend development

  • Utilized MongoDB for database management

  • Implemented React for frontend development

  • Implemented business logic for user authentication, product management, and order processing

Q74. What are the differences between C and Java programming languages?

Ans.

C is a procedural programming language while Java is an object-oriented programming language.

  • C is a low-level language with manual memory management, while Java is a high-level language with automatic memory management.

  • C uses pointers extensively, while Java does not support pointers.

  • C is platform-dependent, while Java is platform-independent due to its bytecode.

  • C does not have built-in support for threads, while Java has built-in support for multithreading.

  • C has a simpler sy...read more

Q75. What is indexing and partioning in dbms?

Ans.

Indexing and partitioning are techniques used in DBMS to improve performance and manage large amounts of data.

  • Indexing is the process of creating a data structure that allows for faster retrieval of data based on certain columns or fields.

  • Partitioning involves dividing a large table into smaller, more manageable parts called partitions, which can be stored on different disks or servers.

  • Both techniques can improve query performance, reduce storage costs, and make it easier to ...read more

Q76. What is the difference between GET AND POST methods in HTTPS?

Ans.

GET method is used to request data from a server, while POST method is used to submit data to a server in HTTPS.

  • GET requests data from a specified resource, while POST submits data to be processed to a specified resource.

  • GET requests can be cached and remain in the browser history, while POST requests are not cached and do not remain in the browser history.

  • GET requests have length restrictions on the amount of data that can be sent, while POST has no such restrictions.

  • GET req...read more

Q77. Design a number system where operations are expressed using recursive functions.

Ans.

Design a number system using recursive functions for operations.

  • Define a base case for the recursive functions, such as when the number reaches 0 or 1.

  • Implement recursive functions for addition, subtraction, multiplication, and division.

  • Each operation should call itself recursively until the base case is reached.

  • Consider efficiency and termination conditions to avoid infinite recursion.

  • Example: Define a recursive function add(a, b) that adds two numbers by recursively increme...read more

Q78. Differences between struct and class

Ans.

Struct is a value type while class is a reference type in C#.

  • Structs are stored on the stack while classes are stored on the heap.

  • Structs cannot be inherited while classes can be inherited.

  • Structs do not support destructors while classes do.

  • Structs are used for small data structures while classes are used for larger, more complex objects.

  • Example of struct: struct Point { public int X; public int Y; }

  • Example of class: class Person { public string Name; public int Age; }

Q79. Do you know about PHP and MySQL?

Ans.

Yes, PHP is a server-side scripting language and MySQL is a relational database management system commonly used together for web development.

  • PHP is used to create dynamic web pages and can be embedded in HTML code

  • MySQL is used to store and manage data in a relational database

  • PHP can connect to MySQL to retrieve and manipulate data

  • Examples of websites built with PHP and MySQL include Facebook and WordPress

Q80. Low Level Design: Design a movie site booking portal using objects and classes.

Ans.

Design a movie booking portal using objects and classes.

  • Create a Movie class with attributes like title, genre, duration, etc.

  • Create a Theater class with attributes like name, location, capacity, etc.

  • Create a Show class with attributes like movie, theater, showtime, price, etc.

  • Create a Booking class with attributes like show, seats, user, etc.

  • Implement methods for booking tickets, canceling tickets, etc.

  • Use database to store movie, theater, show, and booking information.

Q81. What is Redis and where it is used?

Ans.

Redis is an open-source, in-memory data structure store, used as a database, cache, and message broker.

  • Redis is a NoSQL database that stores data in key-value pairs.

  • It is often used as a cache to improve the performance of web applications.

  • Redis can also be used as a message broker for real-time applications.

  • It supports a wide range of data structures, including strings, hashes, lists, sets, and sorted sets.

  • Redis is often used in combination with other databases, such as MySQ...read more

Q82. Javascript framework names?

Ans.

Popular JavaScript frameworks used for backend development.

  • Express.js

  • Node.js

  • Koa.js

  • Hapi.js

  • Sails.js

Q83. SQL query to fetch the 3rd max salary alone, and group the data by country and return the count of employees in each country

Ans.

SQL query to fetch 3rd max salary, group by country, and return count of employees in each country

  • Use a subquery to select the 3rd max salary

  • Join the employee table with the country table

  • Group by country and use COUNT() to get the number of employees

Q84. Given a string of alpha characters. Find the longest substring containing only unique characters. (Best time complexity: O(n))

Ans.

Use sliding window approach to find longest substring with unique characters.

  • Initialize start and end pointers to track current substring

  • Use a hashmap to store the index of each character in the substring

  • Update start pointer when a duplicate character is found

  • Keep track of the longest substring length and indices

  • Repeat until end pointer reaches the end of the string

Q85. 1. Explain Trees and Binary Search Trees.

Ans.

Trees are data structures that store hierarchical data. Binary Search Trees are a type of tree that maintains sorted order.

  • Trees are composed of nodes that have a parent-child relationship.

  • Binary Search Trees have at most two children per node and the left child is always smaller than the parent while the right child is always larger.

  • Binary Search Trees allow for efficient searching, insertion, and deletion operations.

  • Examples of Binary Search Trees include AVL Trees and Red-...read more

Q86. How many times does a for loop execute during traversal?

Ans.

A for loop executes a specific number of times based on the condition provided.

  • The number of times a for loop executes depends on the initial value, condition, and increment/decrement.

  • For example, for(int i=0; i<5; i++) will execute 5 times.

  • Nested loops increase the total number of executions based on the inner loop's iterations.

Q87. What is FATCA and what are its implications.

Ans.

FATCA is a US law that requires foreign financial institutions to report on US citizens' assets held abroad.

  • FATCA stands for Foreign Account Tax Compliance Act

  • It was enacted in 2010 to prevent tax evasion by US citizens holding assets in foreign accounts

  • Foreign financial institutions must report on US citizens' assets held abroad or face penalties

  • FATCA has implications for US citizens living abroad who may face difficulties opening bank accounts or obtaining mortgages

  • FATCA ha...read more

Q88. What is spring Deference between spring and springboot What is Spring mvc What is Microservices What is difference between monolithic and microservices

Ans.

Spring is a Java framework for building enterprise-level applications. Spring Boot is a tool for quickly building Spring-based applications.

  • Spring provides a comprehensive programming and configuration model for modern Java-based enterprise applications.

  • Spring Boot is an opinionated framework that simplifies the Spring application development process.

  • Spring MVC is a web framework built on top of the Spring framework.

  • Microservices is an architectural style that structures an a...read more

Q89. What is difference between concurrent hashmap and hashmap?

Ans.

ConcurrentHashMap allows multiple threads to read/write concurrently, while HashMap is not thread-safe.

  • ConcurrentHashMap allows multiple threads to read/write concurrently without blocking each other.

  • HashMap is not thread-safe and can lead to data corruption if accessed by multiple threads simultaneously.

  • ConcurrentHashMap achieves thread-safety by using internal synchronization mechanisms like locks or CAS operations.

  • HashMap does not provide any internal synchronization, so e...read more

Q90. Define Copy Constructor

Ans.

Copy constructor is a special constructor that creates a new object by copying an existing object.

  • It is used to create a new object with the same values as an existing object.

  • It takes an object of the same class as a parameter.

  • It is automatically called when a new object is created from an existing object.

  • It creates a deep copy of the object, meaning that all the member variables are copied.

  • Example: class MyClass { public: MyClass(const MyClass& obj) { // copy constructor cod...read more

Q91. Create an object and write a function inside it.

Ans.

Creating an object with a function inside it.

  • Create an object using object literal notation

  • Define a function inside the object using function expression or declaration

  • Access the function using object.method() syntax

Q92. How long and comfortable you are with the Python Language

Ans.

I have been using Python for 5 years and am very comfortable with its syntax and libraries.

  • I have 5 years of experience using Python for backend development.

  • I am proficient in using Python libraries such as Flask, Django, and SQLAlchemy.

  • I have worked on various projects where Python was the primary language for backend development.

  • I am comfortable writing clean and efficient code in Python.

Q93. what is java, ejb, struts, hibernate, microservices

Ans.

Java is a programming language. EJB, Struts, Hibernate, and Microservices are Java frameworks.

  • EJB (Enterprise JavaBeans) is a server-side software component that encapsulates business logic of an application.

  • Struts is a framework for building web applications in Java.

  • Hibernate is an ORM (Object-Relational Mapping) tool that simplifies database access in Java applications.

  • Microservices is an architectural style for building complex applications as a suite of small, independent...read more

Q94. Write a program to filter out only the alphabets from the provided Email Address.

Ans.

Program to filter out only alphabets from an email address.

  • Create a function that takes an email address as input.

  • Use regular expressions to filter out only alphabets.

  • Return the filtered alphabets as an array of strings.

Q95. How does database indexing improve query perfoemance?

Ans.

Database indexing improves query performance by reducing the number of disk I/O operations needed to retrieve data.

  • Indexing allows the database to quickly locate specific rows in a table, reducing the need to scan the entire table.

  • Indexes can be created on columns frequently used in WHERE clauses or JOIN conditions.

  • Examples of indexes include primary keys, unique constraints, and composite indexes.

  • Proper indexing can significantly speed up query execution time.

Q96. How the MR can be improved, discuss design improvements

Ans.

Improving merge requests through design enhancements

  • Implement a clearer review process with defined roles and responsibilities

  • Utilize templates for MRs to ensure consistency and completeness

  • Integrate automated testing and code quality checks to streamline the review process

  • Provide better documentation and context for changes made in the MR

  • Enhance communication channels for feedback and discussions on the MR

Q97. What is the purpose of REST API in backend development?

Ans.

REST API in backend development is used to allow communication between different systems over the internet.

  • Allows for communication between different systems or services

  • Follows a client-server architecture

  • Uses standard HTTP methods like GET, POST, PUT, DELETE

  • Supports multiple data formats like JSON, XML

  • Stateless, meaning each request from a client must contain all the information needed to fulfill the request

Q98. Write a code to implement level order traversal in a tree

Ans.

Code to implement level order traversal in a tree

  • Use a queue data structure to keep track of nodes at each level

  • Start by pushing the root node into the queue

  • While the queue is not empty, dequeue a node, print its value, and enqueue its children

Q99. angle between needle of clock hour hand and minute hand at a particular time . they will definitely ask this question .

Ans.

The angle between the hour hand and minute hand of a clock at a particular time.

  • The angle between the hour hand and minute hand can be calculated using the formula: angle = 30 * (hour % 12) + 0.5 * minutes

  • If the angle is greater than 180 degrees, subtract it from 360 to get the smaller angle

  • For example, at 3:15, the hour hand is at 97.5 degrees and the minute hand is at 90 degrees, so the angle between them is 7.5 degrees

Q100. write linq queries to get order id and list of products (based on latest project)

Ans.

Use LINQ queries to retrieve order id and list of products based on latest project.

  • Use OrderByDescending to get the latest project first

  • Join Order and Product tables on OrderId

  • Select OrderId and list of Products

Previous
1
2
3
4
5
6
7
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.4k Interviews
3.8
 • 8.1k Interviews
3.6
 • 7.6k Interviews
4.0
 • 2.3k Interviews
3.3
 • 752 Interviews
3.2
 • 304 Interviews
3.7
 • 170 Interviews
3.1
 • 17 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Recently Viewed
SALARIES
ION Group
SALARIES
Bank of America
SALARIES
IDFC FIRST Bank
REVIEWS
Velocis Systems
No Reviews
SALARIES
Capgemini
REVIEWS
Velocis Systems
No Reviews
SALARIES
Flipkart
SKILL
Interview Questions
250 interview questions
REVIEWS
Velocis Systems
No Reviews
SALARIES
Wolters Kluwer
Backend Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter