Software Development Engineer

400+ Software Development Engineer Interview Questions and Answers

Updated 13 Jul 2025
search-icon

Asked in Amazon

1w ago

Q. Given an array of integers, separate the prime numbers from the non-prime numbers. The order of elements in the array does not matter.

Ans.

Use a hashmap to separate prime and non-prime numbers in an array of strings.

  • Iterate through the array and convert each string to an integer.

  • Use a hashmap to store prime and non-prime numbers based on their divisibility.

  • Convert the hashmap back to separate arrays for prime and non-prime numbers.

Asked in Amazon

2w ago

Q. Given an array of integers where adjacent elements differ by 1, suggest an efficient way to search for a given element.

Ans.

Efficient way to search a given element in an array of integers with adjacent elements 1+ or 1- from each other.

  • Use binary search algorithm to search the element in O(log n) time complexity.

  • Check the middle element and compare it with the given element.

  • If the middle element is greater than the given element, search in the left half of the array.

  • If the middle element is smaller than the given element, search in the right half of the array.

  • Repeat until the element is found or t...read more

2w ago

Q. You are given a thread and are locked in a room. How would you measure the height of the room using the thread?

Ans.

Measure the height of a room using a thread.

  • Tie one end of the thread to a known height point, such as a door handle.

  • Hold the other end of the thread and let it hang down to the floor.

  • Mark the point where the thread touches the floor.

  • Repeat the process at different points in the room to get multiple measurements.

  • Take the average of the measurements to estimate the height of the room.

1w ago

Q. what is polymorphism and interface , what is difference between interface and abstract class

Ans.

Polymorphism allows objects of different classes to be treated as objects of a common superclass. Interface is a contract that defines a set of methods that a class must implement.

  • Polymorphism allows for flexibility in programming by enabling a single interface to be used to represent multiple types of objects

  • Interfaces in Java are similar to abstract classes, but they cannot contain any implementation code

  • Abstract classes can have both abstract and concrete methods, while in...read more

Are these interview questions helpful?

Asked in Sigmoid

2w ago

Q. Where is the bean annotation used in Spring Boot? In a class or method?

Ans.

Bean annotation is used in Spring Boot on class or method to indicate that a method produces a bean to be managed by the Spring container.

  • Bean annotation is used on methods within a class to indicate that the method produces a bean to be managed by the Spring container.

  • It can also be used at the class level to indicate that the class itself is a Spring bean.

  • For example, @Bean annotation can be used on a method that creates and returns a DataSource bean in a configuration clas...read more

2d ago

Q. Write a program to check if a given sentence is a palindrome or not, taking input from the user.

Ans.

The program checks if a given sentence is a palindrome or not.

  • Prompt the user to input a sentence

  • Remove all spaces and punctuation from the sentence

  • Reverse the sentence and compare it with the original sentence to check for palindrome

Software Development Engineer Jobs

Amazon Development Centre (India) Pvt. Ltd. logo
Software Dev Engineer, Amazon Flex 3-8 years
Amazon Development Centre (India) Pvt. Ltd.
4.0
Bangalore / Bengaluru
Amazon Development Centre (India) Pvt. Ltd. logo
Software Development Engineer, IES Payments 3-8 years
Amazon Development Centre (India) Pvt. Ltd.
4.0
Chennai
Amazon Development Centre (India) Pvt. Ltd. logo
Software Dev Engineer III, Brutus Tech 5-10 years
Amazon Development Centre (India) Pvt. Ltd.
4.0
Hyderabad / Secunderabad

Asked in Bridgenext

2w ago

Q. How can you flatten an array that contains multiple nested arrays into a single array with all elements?

Ans.

Flattening a nested array involves recursively extracting elements into a single array.

  • Use recursion: Define a function that checks if an element is an array. If it is, call the function on that element.

  • Example: For input [[1, 2], [3, [4, 5]]], the output should be [1, 2, 3, 4, 5].

  • Use Array.prototype.flat(): In JavaScript, you can use the flat method to flatten arrays to a specified depth.

  • Example: [1, [2, [3, 4]]].flat(2) results in [1, 2, 3, 4].

  • Use reduce: Combine elements i...read more

Asked in Google

2w ago

Q. How do you prioritize tasks when you have multiple deadlines to meet?

Ans.

Prioritize tasks based on deadlines, importance, and impact on overall project goals.

  • Evaluate deadlines and prioritize tasks based on urgency

  • Consider the importance of each task in relation to project goals

  • Assess the impact of completing each task on overall project progress

  • Communicate with stakeholders to understand priorities and expectations

  • Break down tasks into smaller sub-tasks to manage workload effectively

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in HCLTech

2w ago

Q. What is Sum Of Digit and ProductOfDogit why used ?

Ans.

Sum of Digit and Product of Digit are mathematical operations used in various applications.

  • Sum of Digit is the sum of all the digits in a number. It is used in various applications like checking if a number is divisible by 3 or 9.

  • Product of Digit is the product of all the digits in a number. It is used in various applications like checking if a number is a perfect square or if it has any repeated digits.

  • Both operations are used in cryptography to generate and verify checksums...read more

Asked in kipi.ai

1w ago

Q. What is the difference between a stored procedure and a function?

Ans.

Stored procedures are used to perform a set of actions, while functions return a single value.

  • Stored procedures are precompiled and stored in a database, while functions are compiled at runtime.

  • Functions can be used in SQL statements, while stored procedures cannot be used in SQL statements.

  • Stored procedures can have input and output parameters, while functions can only have input parameters.

  • Functions can be called from within stored procedures, but stored procedures cannot b...read more

Asked in Infosys

1w ago

Q. What is the difference between DBMS and RDBMS?

Ans.

DBMS is a software to manage databases while RDBMS is a type of DBMS that uses a relational model.

  • DBMS stands for Database Management System while RDBMS stands for Relational Database Management System.

  • DBMS can manage any type of database while RDBMS uses a specific model to manage data.

  • RDBMS uses tables to store data and relationships between tables are defined by keys.

  • Examples of RDBMS include MySQL, Oracle, and SQL Server while examples of DBMS include MongoDB and Cassandr...read more

4d ago

Q. Given an array of sentences and an integer k, return the top k frequent sentences. Explain your approach using HashMap and PriorityQueue.

Ans.

Find the top k frequent sentences from an array using HashMap and PriorityQueue.

  • Use a HashMap to count the frequency of each sentence. For example, for input ['hello', 'world', 'hello'], the map will be {'hello': 2, 'world': 1}.

  • Utilize a PriorityQueue (min-heap) to keep track of the top k sentences based on their frequency. If the size exceeds k, remove the least frequent.

  • Sort the sentences in the PriorityQueue by frequency and then lexicographically if frequencies are the sa...read more

Asked in Progress

4d ago

Q. One coding Question 1. Number of pairs in array having sum k.

Ans.

Count pairs in array with sum k.

  • Use a hashmap to store the frequency of each element in the array.

  • For each element, check if k - element exists in the hashmap.

  • Increment the count of pairs if found and update the hashmap accordingly.

Q. Create a news application like InShorts using Flutter & Open News API

Ans.

A news app like InShorts using Flutter & Open News API

  • Use Flutter to build the UI for the app

  • Integrate Open News API to fetch news articles

  • Display news articles in a concise and easy-to-read format

  • Allow users to customize their news feed based on topics and sources

  • Implement push notifications for breaking news

  • Include social sharing options for articles

Asked in Hike

1w ago

Q. Describe the technical architecture for a photo viewer app on an Android device.

Ans.

A photo viewer app for Android devices.

  • Use RecyclerView to display a grid of photos

  • Implement a caching mechanism to improve performance

  • Support gestures for zooming and swiping between photos

  • Integrate with a cloud storage service for photo storage and retrieval

  • Implement a search feature to allow users to find specific photos

1w ago

Q. Given a 2D character matrix, find a specific string within it, allowing for horizontal, vertical, or diagonal arrangements.

Ans.

Search for a string in a 2D character matrix in any direction

  • Iterate through each cell of the matrix

  • For each cell, check all possible directions for the string

  • If found, return the starting and ending coordinates of the string

Q. What are Firebase Dynamic Links and how do you handle them?

Ans.

Firebase Dynamic Links is a deep linking platform that allows users to share content across different devices and platforms.

  • Firebase Dynamic Links are URLs that allow users to share content across different devices and platforms

  • They can be used to redirect users to specific content within an app or website

  • They can also be used to track user engagement and measure the effectiveness of marketing campaigns

1w ago

Q. Write a function to reverse the characters in a string.

Ans.

This function reverses the characters in a given string and returns the reversed string.

  • Use Python slicing: `reversed_string = original_string[::-1]`.

  • Iterate through the string in reverse: `for char in original_string[::-1]:`.

  • Use the `reversed()` function: `''.join(reversed(original_string))`.

  • Example: Input: 'hello', Output: 'olleh'.

  • Example: Input: '12345', Output: '54321'.

Asked in Samsung

6d ago

Q. Difference between DFS and BFS?When to use which one?

Ans.

DFS and BFS are graph traversal algorithms. DFS explores as far as possible before backtracking. BFS explores level by level.

  • DFS stands for Depth First Search, while BFS stands for Breadth First Search.

  • DFS explores as far as possible along each branch before backtracking, while BFS explores level by level.

  • DFS uses a stack data structure, while BFS uses a queue data structure.

  • DFS is often used for solving problems like finding connected components, topological sorting, and sol...read more

5d ago

Q. What are the basics of SQL, including Data Definition Language (DDL) and Data Manipulation Language (DML)?

Ans.

SQL basics include DDL for defining database structures and DML for manipulating data within those structures.

  • DDL (Data Definition Language) includes commands like CREATE, ALTER, and DROP to define and modify database structures.

  • Example of DDL: CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100));

  • DML (Data Manipulation Language) includes commands like SELECT, INSERT, UPDATE, and DELETE to manage data within tables.

  • Example of DML: INSERT INTO users (id, name) VALUES (1, ...read more

1w ago

Q. Design a parking lot.

Ans.

Design a parking lot system to manage parking spaces, vehicles, and payment processing efficiently.

  • Define classes: ParkingLot, ParkingSpace, Vehicle, Ticket, Payment.

  • ParkingLot can have multiple ParkingSpaces categorized by type (e.g., compact, standard, oversized).

  • Implement methods for parking a vehicle, retrieving a vehicle, and processing payments.

  • Use a hashmap to track parked vehicles and their corresponding tickets for quick access.

  • Consider edge cases like full parking l...read more

Asked in Amazon

1w ago

Q. Given a length N, how many binary strings of length N do not contain consecutive 1s?

Ans.

The number of binary strings of length N without consecutive 1s.

  • Use dynamic programming to solve the problem.

  • Create an array to store the number of valid strings for each length.

  • Initialize the array with base cases.

  • Iterate through the array and calculate the number of valid strings for each length.

  • Return the value at the Nth index of the array.

1w ago

Q. What approach do you follow to debug JavaScript code?

Ans.

I follow a systematic approach to debug JavaScript code.

  • Identify the problem area and reproduce the issue

  • Use console.log() to print values and debug

  • Use browser developer tools to step through code

  • Check for syntax errors and typos

  • Use a linter to catch common errors

  • Use a debugger tool like Chrome DevTools

  • Break down the code into smaller parts for easier debugging

Asked in Genpact

1w ago

Q. Describe a puzzle you solved and wrote a C program for.

Ans.

Solve a puzzle by writing a C program to manipulate strings or arrays effectively.

  • Use arrays of strings to store multiple strings, e.g., char *arr[] = {'apple', 'banana', 'cherry'};

  • Implement string manipulation functions like strlen, strcpy, and strcat for handling strings.

  • Consider edge cases such as empty strings or maximum length strings when designing your solution.

  • Utilize loops to iterate through arrays and perform operations on each string.

Q. Given an array of integers, determine whether the elements are in ascending or descending order.

Ans.

Check if an array of strings is sorted in ascending or descending order.

  • Iterate through the array and compare adjacent elements.

  • For ascending order, check if each element is less than or equal to the next.

  • For descending order, check if each element is greater than or equal to the next.

  • Example: ['apple', 'banana', 'cherry'] is ascending; ['cherry', 'banana', 'apple'] is descending.

Asked in Sigmoid

5d ago

Q. Which access modifier restricts interface method access to only derived or implemented classes?

Ans.

Protected access modifier restricts interface method access to only derived or implemented classes.

  • Use 'protected' access modifier to restrict access to only derived or implemented classes

  • Protected members are accessible within the same package or by subclasses

  • Example: 'protected void methodName() {}' in an interface

Asked in Leena AI

1d ago

Q. 1) Time complexity of binary search for array and linked list

Ans.

Binary search has O(log n) time complexity for arrays and O(n) for linked lists.

  • Binary search is efficient for arrays due to their random access nature.

  • Linked lists require sequential traversal, making binary search inefficient.

  • For arrays, the time complexity is O(log n) as the search space is halved with each iteration.

  • For linked lists, the time complexity is O(n) as all nodes must be visited to find the target.

  • Binary search can be implemented recursively or iteratively.

Asked in Deeptek

1w ago

Q. How would you find a substring within a larger string without using built-in functions? What if the larger string is extremely large? What is the time complexity of your solution?

Ans.

Use a sliding window approach to search for a substring in a larger string without using built-in functions.

  • Iterate through the larger string using a window of the size of the substring to search for.

  • Compare the characters in the window with the substring to check for a match.

  • Move the window one character at a time until the end of the larger string is reached.

  • Time complexity is O(n*m) where n is the length of the larger string and m is the length of the substring.

Asked in eShakti

2w ago

Q. How would you write an update query in SQL?

Ans.

An update query in SQL is used to modify existing records in a database table.

  • Use the UPDATE keyword followed by the table name

  • Set the column(s) to be updated using SET keyword

  • Specify the new values for the column(s)

  • Add a WHERE clause to specify which records to update

1w ago

Q. What are the differences between SQL and NoSQL databases, and when should each be used?

Ans.

SQL is best for structured data, NoSQL for unstructured. Use SQL for complex queries, NoSQL for scalability and speed.

  • SQL is best for structured data, NoSQL for unstructured

  • Use SQL for complex queries, NoSQL for scalability and speed

  • SQL is ACID compliant, NoSQL is BASE

  • Examples of SQL: MySQL, Oracle, PostgreSQL

  • Examples of NoSQL: MongoDB, Cassandra, Redis

Previous
1
2
3
4
5
6
7
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Accenture Logo
3.7
 • 8.7k Interviews
Amazon Logo
4.0
 • 5.4k Interviews
HCLTech Logo
3.5
 • 4.1k Interviews
Flipkart Logo
3.9
 • 1.5k Interviews
View all
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Software Development Engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

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

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits