Software Development Engineer II

100+ Software Development Engineer II Interview Questions and Answers

Updated 27 Feb 2025

Q51. What is different states in Activity lifecycle

Ans.

Different states in Activity lifecycle include onCreate, onStart, onResume, onPause, onStop, onDestroy.

  • onCreate - Activity is being created

  • onStart - Activity is becoming visible to the user

  • onResume - Activity is in the foreground and has focus

  • onPause - Activity is partially visible but still running

  • onStop - Activity is no longer visible to the user

  • onDestroy - Activity is being destroyed

Q52. What is CDC in sql service?

Ans.

CDC stands for Change Data Capture in SQL Server.

  • CDC is a feature in SQL Server that captures changes made to data in a table.

  • It allows you to track insert, update, and delete operations on the table.

  • CDC uses a separate table to store the changes made to the tracked table.

  • It is useful for auditing, data replication, and data warehousing purposes.

Q53. Design a search service for E-commerce website.

Ans.

Design a search service for E-commerce website.

  • Utilize a search engine like Elasticsearch for fast and accurate search results

  • Implement filters for refining search results by category, price range, brand, etc.

  • Include autocomplete suggestions to assist users in their search queries

  • Optimize search results based on user behavior and preferences

  • Allow users to save their search queries and receive notifications for new matching products

Q54. Build a Hash Map which does everything in o(1)

Ans.

Use a combination of hash table and linked list to achieve O(1) operations for a Hash Map.

  • Use a hash table to store key-value pairs and a linked list to handle collisions.

  • Implement a hash function to map keys to indices in the hash table.

  • For each key, calculate the hash value and store the corresponding value in the hash table at that index.

  • To handle collisions, use separate chaining with linked lists at each index of the hash table.

  • When searching for a key, calculate the has...read more

Are these interview questions helpful?

Q55. Design a car hotel booking system.

Ans.

Design a car hotel booking system

  • Create a database to store information about available car hotels

  • Implement a search feature for users to find and book car hotels

  • Include a booking system with payment integration

  • Allow users to leave reviews and ratings for car hotels

Q56. Security practice in frontend and backend perspective

Ans.

Security practices in frontend and backend development are crucial for protecting user data and preventing cyber attacks.

  • Implement input validation to prevent SQL injection and cross-site scripting attacks

  • Use HTTPS protocol to encrypt data transmission between frontend and backend

  • Implement authentication and authorization mechanisms to control access to sensitive data

  • Regularly update software libraries and frameworks to patch security vulnerabilities

  • Implement security headers...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q57. What is marshalling & unmarshalling in java

Ans.

Marshalling is the process of converting Java objects into a data format like JSON or XML, while unmarshalling is the reverse process.

  • Marshalling is used to serialize Java objects into a format that can be easily stored or transmitted.

  • Unmarshalling is used to deserialize data back into Java objects.

  • Marshalling and unmarshalling are commonly used in web services to convert data between different systems.

  • Example: Converting a Java object into JSON using a library like Jackson f...read more

Q58. Find the longest sub string with non repeating chars

Ans.

Find the longest sub string with non repeating chars

  • Use a sliding window approach to track the current substring

  • Keep track of the characters seen so far in a set

  • Update the start of the window when a repeating character is encountered

Software Development Engineer II Jobs

Software Development Engineer II, Global Payments Tech 2-9 years
Amazon India Software Dev Centre Pvt Ltd
4.1
Bangalore / Bengaluru
Software Development Engineer II, Fulfillment by Amazon 2-9 years
Amazon India Software Dev Centre Pvt Ltd
4.1
Bangalore / Bengaluru
SDE 2, Amazon Hub 2-9 years
Amazon India Software Dev Centre Pvt Ltd
4.1
Gurgaon / Gurugram

Q59. DS problem with arrays like max profit

Ans.

Find the maximum profit that can be made by buying and selling stocks in an array.

  • Use a greedy approach to find the maximum profit by keeping track of the minimum price and updating the maximum profit.

  • Iterate through the array and calculate the difference between each element and the minimum price seen so far.

  • Return the maximum profit obtained from the array.

Q60. HLD design for something like Dropbox

Ans.

High-level design for a Dropbox-like system

  • Use a distributed file system to store files

  • Implement a synchronization mechanism to ensure consistency across devices

  • Use encryption to protect user data

  • Implement a user authentication and authorization system

  • Provide a web interface and mobile apps for easy access

  • Consider scalability and fault tolerance

  • Implement version control to allow users to revert to previous versions of files

Q61. Design People Management system

Ans.

Design a system to manage people

  • Identify the roles and responsibilities of people in the organization

  • Create a database to store employee information

  • Develop a user interface for employees to update their information

  • Implement a system for managers to approve employee requests

  • Integrate with payroll and benefits systems

  • Ensure data security and privacy

Q62. How rails work when you request an API

Ans.

Rails use controllers to handle incoming API requests, routing them to the appropriate actions in the application.

  • Rails routes incoming API requests to the appropriate controller action based on the URL and HTTP method.

  • Controllers in Rails contain the logic to process the request, interact with the model layer, and render a response.

  • Rails uses RESTful conventions to map HTTP methods (GET, POST, PUT, DELETE) to controller actions (index, create, update, destroy).

  • Example: When ...read more

Q63. How you will add two linked lists

Ans.

To add two linked lists, traverse both lists simultaneously and add corresponding nodes.

  • Create a new linked list to store the sum

  • Traverse both linked lists simultaneously and add corresponding nodes

  • If the sum is greater than 9, carry over the 1 to the next node

  • If one list is longer than the other, add the remaining nodes to the sum

  • Return the new linked list

Q64. define SOLID principle, explain last project

Ans.

SOLID principle is a set of five design principles to make software designs more understandable, flexible, and maintainable.

  • S - Single Responsibility Principle: A class should have only one reason to change.

  • O - Open/Closed Principle: Software entities should be open for extension but closed for modification.

  • L - Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without affecting the program's correctness.

  • I - Interface S...read more

Q65. write a in memory backend for social media app

Ans.

Implement an in-memory backend for a social media app

  • Use a data structure like a hashmap to store user profiles, posts, and relationships

  • Implement functions for creating, updating, and deleting user profiles and posts

  • Handle relationships between users such as following and friend requests

Q66. How to run async tasks in python

Ans.

Use asyncio library to run async tasks in Python

  • Import asyncio library

  • Define async functions using 'async def'

  • Use 'await' keyword to run async functions

  • Use asyncio.run() to run the async tasks

Q67. 1. Count number of islands 2. House Robber

Ans.

Count number of islands and solve the House Robber problem.

  • Count number of islands: Use DFS or BFS to traverse the grid and mark visited cells as part of an island.

  • House Robber: Use dynamic programming to calculate the maximum amount of money that can be robbed without alerting the police.

  • Example for counting number of islands: Given grid = [['1','1','0','0','0'],['1','1','0','0','0'],['0','0','1','0','0'],['0','0','0','1','1']], the number of islands is 3.

  • Example for House R...read more

Q68. What is Singleton and implement it.

Ans.

Singleton is a design pattern that restricts the instantiation of a class to one object.

  • Singleton pattern ensures that a class has only one instance and provides a global point of access to it.

  • Commonly used in scenarios where only a single instance of a class is needed, such as database connections or logging.

  • Implementation involves a private constructor, a static method to access the instance, and a static variable to hold the instance.

  • Example: public class Singleton { priva...read more

Q69. How does garbage collection work in c#?

Ans.

Garbage collection in C# automatically manages memory by reclaiming unused objects.

  • Garbage collection in C# uses a mark-and-sweep algorithm to identify and reclaim memory that is no longer in use.

  • It runs in the background and periodically checks for objects that are no longer reachable.

  • Garbage collection helps prevent memory leaks and makes memory management easier for developers.

  • Example: C# automatically deallocates memory for objects like strings, arrays, and other data typ...read more

Q70. HLD for Swiggy Delivery Assignment System

Ans.

Swiggy Delivery Assignment System HLD

  • Use a centralized system to assign delivery tasks to delivery executives based on various factors like distance, availability, and ratings

  • Implement a matching algorithm to efficiently assign tasks to the nearest available executive

  • Utilize real-time tracking to monitor the status of each delivery and optimize routes for faster delivery times

Q71. LLD for Swiggy Delivery Assingment System

Ans.

LLD for Swiggy Delivery Assignment System

  • Use a centralized system to assign delivery tasks to delivery executives based on various factors like distance, availability, ratings, etc.

  • Implement a matching algorithm to efficiently assign tasks to the most suitable delivery executive.

  • Include features like real-time tracking, notifications, and reassignment in case of unavailability or delays.

  • Consider scalability and performance optimizations to handle a large number of concurrent ...read more

Q72. Design Unix Find File Library

Ans.

Design a Unix Find File Library

  • Implement functions to search for files based on criteria like name, size, permissions, etc.

  • Utilize system calls like opendir(), readdir(), and stat() to traverse directories and gather file information.

  • Support options for recursive searching, filtering by file type, and specifying search depth.

  • Include error handling for cases like permission denied or invalid paths.

  • Provide a user-friendly interface with options for displaying results in differe...read more

Q73. How you read csv without pandas

Ans.

Reading CSV without pandas involves using built-in Python modules like csv.

  • Use the csv module to open and read the CSV file

  • Iterate through the rows and process the data accordingly

  • Handle any necessary data conversions or manipulations manually

Q74. What are list and tuple in python

Ans.

List and tuple are data structures in Python used to store multiple items. Lists are mutable, while tuples are immutable.

  • List is denoted by square brackets [] and can be modified after creation

  • Tuple is denoted by parentheses () and cannot be modified after creation

  • Lists are used when the order of elements needs to be preserved and elements can be changed

  • Tuples are used when the order of elements needs to be preserved but elements should not be changed

  • Example of list: my_list ...read more

Q75. Find the indices for max product subarray

Ans.

Find the indices of the subarray with the maximum product in an array.

  • Iterate through the array and keep track of the maximum product, starting index, and ending index.

  • Consider both positive and negative numbers while calculating the product.

  • Return the starting and ending indices of the subarray with the maximum product.

Q76. System Design - Design a bike rental shop.

Ans.

Design a bike rental shop system.

  • Create a database to store information about bikes, customers, rentals, etc.

  • Develop a user-friendly website or mobile app for customers to browse and rent bikes.

  • Implement a payment system for customers to pay for rentals.

  • Have a system in place for bike maintenance and tracking.

  • Consider implementing a rating system for customers to provide feedback on bikes and service.

Q77. Design least recently used cache.

Ans.

Design a least recently used cache system.

  • Use a combination of a hash map and a doubly linked list to keep track of the least recently used items.

  • When a new item is accessed, move it to the front of the list.

  • If the cache is full, remove the least recently used item from the end of the list.

Q78. Architecture of the current product

Ans.

The current product follows a microservices architecture.

  • The product is divided into multiple independent services.

  • Each service has its own database and communicates with other services through APIs.

  • The architecture allows for scalability and flexibility.

  • Examples of services include user management, payment processing, and inventory management.

Q79. data base schema design of train booking system

Ans.

Design a database schema for a train booking system

  • Create tables for trains, stations, bookings, users, and tickets

  • Use foreign keys to establish relationships between tables

  • Include columns for train schedule, seat availability, and user information

  • Consider implementing indexes for faster query performance

Q80. Implementation of linked list in Java?

Ans.

A linked list is a data structure where each element points to the next element in the sequence.

  • Create a Node class with data and next pointer

  • Initialize head pointer to null for an empty list

  • Implement methods like insert, delete, search, and display

  • Example: Node class - class Node { int data; Node next; }

Q81. Merge Sort of two sorted arrays?

Ans.

Merge two sorted arrays using Merge Sort algorithm.

  • Create a new array to store the merged result

  • Compare elements from both arrays and add the smaller one to the new array

  • Continue this process until all elements are merged

Q82. How does viewmodel works internally?

Ans.

Viewmodel is a design pattern that separates the data of an application from the UI logic.

  • Viewmodel stores and manages UI-related data in a lifecycle-conscious way.

  • It survives configuration changes and is not destroyed when the UI is destroyed.

  • Viewmodel is typically used in conjunction with LiveData to update the UI when the data changes.

  • It helps in keeping the UI logic separate from the UI components, making the code more maintainable and testable.

Q83. System design for a delivery management system

Ans.

Design a system to manage deliveries efficiently

  • Use a centralized database to store information about deliveries, drivers, and customers

  • Implement a tracking system to monitor the status of deliveries in real-time

  • Include features like route optimization, delivery scheduling, and notifications for customers

  • Consider scalability and reliability to handle a large volume of deliveries

  • Integrate with mapping APIs for accurate location tracking

Q84. What are Concepts of T-SQL

Ans.

T-SQL concepts include data manipulation, querying, transactions, and stored procedures.

  • Data manipulation involves inserting, updating, and deleting data in a database.

  • Querying involves retrieving data from a database using SELECT statements.

  • Transactions ensure that a group of database operations are completed as a single unit of work.

  • Stored procedures are precompiled SQL statements that can be executed multiple times.

  • Other concepts include views, triggers, and user-defined f...read more

Q85. Reverse linklist by group

Ans.

Reverse a linked list by group of given size

  • Divide the linked list into groups of given size

  • Reverse each group individually

  • Connect the reversed groups to form the final linked list

Q86. Ds codebto sort array to the left and right

Ans.

Sort array of strings to the left and right

  • Use a custom comparator function to sort the array based on specific criteria

  • Split the array into two parts based on the sorted order

  • Join the two parts back together to get the final sorted array

Q87. Check wether its a palindrome linked list

Ans.

Check if a linked list is a palindrome

  • Traverse the linked list to find the middle point

  • Reverse the second half of the linked list

  • Compare the first half with the reversed second half

Q88. Design multiplayer game like pubg

Ans.

Design a multiplayer game similar to PUBG.

  • Create a large map with various terrains and buildings

  • Allow players to form teams and communicate with each other

  • Include a variety of weapons and equipment for players to find and use

  • Implement a shrinking play area to force players into closer combat

  • Include a ranking system to encourage competition and skill improvement

Q89. Error Handling way in sql ?

Ans.

Error handling in SQL involves using try-catch blocks, raising custom errors, and using error functions.

  • Use TRY-CATCH blocks to handle errors gracefully

  • Raise custom errors using RAISEERROR function

  • Use error functions like ERROR_MESSAGE(), ERROR_NUMBER(), ERROR_SEVERITY(), ERROR_STATE(), and ERROR_LINE() to retrieve error information

Q90. Design a like and comments system

Ans.

Design a like and comments system for a social media platform

  • Use a relational database to store user likes and comments

  • Implement a feature to allow users to like posts and comments

  • Include a feature to display the number of likes and comments on each post

  • Allow users to comment on posts and reply to comments

  • Implement a notification system for users to be notified of new likes and comments on their posts

Q91. get a maximum sum from picking corner elements

Ans.

Find the maximum sum by picking corner elements of a matrix

  • Start by selecting the four corner elements of the matrix

  • Compare the sum of the diagonally opposite corners and choose the pair with the higher sum

  • Repeat the process with the remaining elements until all corners are picked

Q92. SQL query for fetching some info

Ans.

SQL query to fetch specific information from a database

  • Use SELECT statement to specify the columns you want to retrieve

  • Use FROM clause to specify the table from which to retrieve the data

  • Use WHERE clause to add conditions for filtering the data

  • Use JOIN clause to combine data from multiple tables if needed

Q93. What is Bulk insert?

Ans.

Bulk insert is a process of inserting a large amount of data into a database at once.

  • Efficient way to insert large volumes of data into a database

  • Reduces overhead by minimizing the number of transactions

  • Often used for data migration or loading data from external sources

Q94. What is synonyms?

Ans.

Synonyms are words that have similar meanings.

  • Synonyms are words that can be used interchangeably in a sentence.

  • They help in avoiding repetition and adding variety to the language.

  • Examples include: big and large, happy and joyful, fast and quick.

Q95. Parse data inside a multi-line string

Ans.

Use regular expressions to extract data from a multi-line string

  • Use the re module in Python to create a regular expression pattern

  • Use the re.findall() function to extract data based on the pattern

  • Consider using groups in the regular expression pattern to capture specific data

Q96. High level design for 3 products

Ans.

High level design for 3 products

  • Identify user needs and requirements

  • Create a conceptual design for each product

  • Define the architecture and components

  • Consider scalability, security, and performance

  • Document the design and review with stakeholders

Q97. Low-Level Design of Parking Lot.

Ans.

Design a parking lot system including classes, functions, and data structures.

  • Create a ParkingLot class with attributes like capacity, available spots, and a list of parking spots.

  • Implement a Vehicle class with attributes like license plate number, size, and type.

  • Design a ParkingSpot class with attributes like spot number, availability, and size.

  • Use data structures like arrays or lists to manage parking spots and vehicles efficiently.

  • Implement methods like parkVehicle(), remo...read more

Q98. String manipulation problem

Ans.

Reverse each word in a given array of strings

  • Iterate through each string in the array

  • Split each string into individual words

  • Reverse each word and join them back together

  • Return the modified array of strings

Q99. Design a recommendation engine.

Ans.

Design a recommendation engine for personalized suggestions based on user preferences and behavior.

  • Collect user data such as browsing history, purchase history, ratings, and interactions.

  • Use collaborative filtering, content-based filtering, or hybrid approaches to generate recommendations.

  • Implement algorithms like matrix factorization, k-nearest neighbors, or neural networks for personalized suggestions.

  • Regularly update recommendations based on user feedback and behavior.

  • Prov...read more

Q100. Find a target element in a sorted array

Ans.

Binary search algorithm can be used to find a target element in a sorted array.

  • Implement binary search algorithm to efficiently find the target element in a sorted array.

  • Compare the target element with the middle element of the array and adjust the search range accordingly.

  • Continue dividing the search range in half until the target element is found or the search range is empty.

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

Interview experiences of popular companies

4.1
 • 5k Interviews
4.0
 • 1.3k Interviews
3.8
 • 121 Interviews
3.9
 • 84 Interviews
3.8
 • 75 Interviews
3.3
 • 59 Interviews
3.7
 • 56 Interviews
2.5
 • 16 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

Software Development Engineer II 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