Software Development Engineer
400+ Software Development Engineer Interview Questions and Answers

Asked in Amazon

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.
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

Q. Given an array of integers where adjacent elements differ by 1, suggest an efficient way to search for a given element.
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

Asked in Samsung Research

Q. You are given a thread and are locked in a room. How would you measure the height of the room using the thread?
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.

Asked in Ksolves India Limited

Q. what is polymorphism and interface , what is difference between interface and abstract class
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

Asked in Sigmoid

Q. Where is the bean annotation used in Spring Boot? In a class or method?
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

Asked in Modak Analytics

Q. Write a program to check if a given sentence is a palindrome or not, taking input from the user.
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




Asked in Bridgenext

Q. How can you flatten an array that contains multiple nested arrays into a single array with all elements?
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

Q. How do you prioritize tasks when you have multiple deadlines to meet?
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 🌟

Asked in HCLTech

Q. What is Sum Of Digit and ProductOfDogit why used ?
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

Q. What is the difference between a stored procedure and a function?
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

Q. What is the difference between DBMS and RDBMS?
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

Asked in Bahwan CyberTek

Q. Given an array of sentences and an integer k, return the top k frequent sentences. Explain your approach using HashMap and PriorityQueue.
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

Q. One coding Question 1. Number of pairs in array having sum k.
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.

Asked in RealLearning Technologies

Q. Create a news application like InShorts using Flutter & Open News API
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

Q. Describe the technical architecture for a photo viewer app on an Android device.
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

Asked in Microsoft Corporation

Q. Given a 2D character matrix, find a specific string within it, allowing for horizontal, vertical, or diagonal arrangements.
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

Asked in RealLearning Technologies

Q. What are Firebase Dynamic Links and how do you handle them?
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

Asked in Microsoft Corporation

Q. Write a function to reverse the characters in a string.
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

Q. Difference between DFS and BFS?When to use which one?
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

Asked in Future Focus Infotech

Q. What are the basics of SQL, including Data Definition Language (DDL) and Data Manipulation Language (DML)?
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

Asked in Microsoft Corporation

Q. Design a parking lot.
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

Q. Given a length N, how many binary strings of length N do not contain consecutive 1s?
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.
Asked in RHA Technologies

Q. What approach do you follow to debug JavaScript code?
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

Q. Describe a puzzle you solved and wrote a C program for.
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.

Asked in RealLearning Technologies

Q. Given an array of integers, determine whether the elements are in ascending or descending order.
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

Q. Which access modifier restricts interface method access to only derived or implemented classes?
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

Q. 1) Time complexity of binary search for array and linked list
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

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?
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

Q. How would you write an update query in SQL?
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

Asked in Zopsmart Technology

Q. What are the differences between SQL and NoSQL databases, and when should each be used?
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
Interview Questions of Similar Designations
Interview Experiences of Popular Companies





Top Interview Questions for Software Development Engineer Related Skills



Reviews
Interviews
Salaries
Users

