Software Engineer2
100+ Software Engineer2 Interview Questions and Answers

Asked in JPMorgan Chase & Co.

Q. Write an SQL query to get the second highest salary in the table
SQL query to get the second highest salary in a table
Use the MAX() function to find the highest salary
Use the WHERE clause to exclude the highest salary
Order the salaries in descending order and limit the result to 1

Asked in Procore

Q. How can the complexity of this problem be improved?
Improving problem complexity involves optimizing algorithms, reducing time/space usage, and leveraging data structures effectively.
Analyze the algorithm's time complexity; for example, switching from O(n^2) to O(n log n) using a more efficient sorting algorithm.
Utilize appropriate data structures; for instance, using a hash table for O(1) average time complexity in lookups instead of O(n) with arrays.
Implement memoization or dynamic programming to avoid redundant calculations...read more

Asked in Infosys

Q. What is the difference between an abstract class and an interface?
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructors, fields, and methods, while interface can only have constants and method signatures.
A class can extend only one abstract class, but can implement multiple interfaces.
Abstract classes are used to define a common behavior for subclasses, while interfaces are used to define a contract for classes to implement.
Example: Abstract class ...read more

Asked in Walmart

Q. Difference between standard ADSO and write optimise DSO. Why do define keys in ADSO.
Standard ADSO is for persistent storage and reporting, while write optimized DSO is for temporary storage. Keys in ADSO are used for data modeling and performance optimization.
Standard ADSO is used for persistent storage and reporting, while write optimized DSO is used for temporary storage before loading data to a standard ADSO.
Write optimized DSO does not store data persistently, making it suitable for temporary data storage during data loads.
Keys in ADSO are defined to uni...read more

Asked in VIPoint

Q. How would you check for load issues and spamming?
To check load issue and spamming, monitor server performance, analyze traffic patterns, implement CAPTCHA, and use machine learning algorithms.
Monitor server performance to identify any spikes in traffic or unusual activity
Analyze traffic patterns to detect any abnormal behavior or patterns consistent with spamming
Implement CAPTCHA or other verification methods to prevent automated spamming
Utilize machine learning algorithms to continuously learn and adapt to new spamming tec...read more

Asked in upGrad

Q. Describe how you would design the database for an e-learning platform like UpGrad, including handling login and lectures.
Designing a database for an e-learning platform to manage user login and lecture content effectively.
User Table: Stores user information like user_id, name, email, password_hash.
Course Table: Contains course details such as course_id, title, description, and instructor_id.
Lecture Table: Links to courses with fields like lecture_id, course_id, title, content, and duration.
Enrollment Table: Manages user enrollments with user_id, course_id, enrollment_date.
Progress Table: Tracks...read more
Software Engineer2 Jobs




Asked in Avalara Technologies

Q. Design a complete system flow for a pizza shop, detailing the process from taking orders to delivery.
A comprehensive system flow for a pizza shop from order placement to delivery.
Customer places an order via phone, website, or app.
Order details are captured: type of pizza, size, toppings, and delivery address.
Payment is processed through secure methods (credit card, PayPal, etc.).
Order is sent to the kitchen for preparation.
Pizza is prepared, baked, and packaged for delivery.
Delivery driver is assigned and picks up the order.
Driver delivers the pizza to the customer’s addres...read more

Asked in Wipro

Q. in depth practice of String Manipulations using looping and conditional statements
String manipulation using loops and conditionals for software engineering
Use loops to iterate through each character in the string
Use conditional statements to check for specific conditions and manipulate the string accordingly
Examples: reversing a string, counting occurrences of a specific character, removing whitespace
Share interview questions and help millions of jobseekers 🌟

Asked in JPMorgan Chase & Co.

Q. Where are objects stored in memory?
Objects are stored in memory in the heap or stack depending on their scope and lifetime.
Objects with local scope are stored on the stack, while objects with dynamic memory allocation are stored on the heap.
Primitive data types like int, float are stored on the stack, while complex objects like arrays, classes are stored on the heap.
Objects stored on the stack have faster access but limited size, while objects on the heap have slower access but can grow dynamically.

Asked in Credit Acceptance

Q. On what basis would you consider sharding the database?
Sharding the database is based on factors like scalability, performance, and data distribution.
Consider sharding when the database is growing rapidly and needs to handle increased load.
Shard based on geographical location to reduce latency for users in different regions.
Shard based on specific data types or access patterns to optimize performance.
Consider sharding when the database becomes too large to efficiently handle queries and transactions.
Evaluate the trade-offs betwee...read more

Asked in Flyin.com

Q. Given a 2D matrix, find the number of ways to reach the rightmost cell from the topmost cell.
The number of ways to reach the rightmost cell from the topmost cell in a 2D matrix can be calculated using dynamic programming.
Use dynamic programming to calculate the number of ways to reach each cell in the matrix.
At each cell, the number of ways to reach it is the sum of the number of ways to reach the cell above it and the cell to the left of it.
The value in the rightmost cell will give the total number of ways to reach it from the topmost cell.

Asked in Lowe's

Q. What is the difference between var, let, and const?
var, let, and const are all used for variable declaration in JavaScript, but they have different scopes and mutability.
var is function-scoped and can be redeclared and reassigned
let is block-scoped and can be reassigned but not redeclared
const is block-scoped and cannot be reassigned or redeclared

Asked in FedEx Express

Q. Should an abstract class always have an abstract method?
No, an abstract class can have concrete methods as well.
An abstract class can have both abstract and concrete methods.
Abstract methods are meant to be implemented by subclasses, while concrete methods can have a default implementation.
Having only abstract methods in an abstract class is not a requirement.

Asked in ZeMoSo Technologies

Q. System design of Paytm and Microservices Architecture.
Paytm uses microservices architecture for scalability and flexibility in system design.
Paytm's system design is based on microservices architecture to break down the application into smaller, independent services.
Each service in Paytm's architecture handles a specific function, such as payments, wallet, or shopping.
Microservices communicate with each other through APIs, allowing for easier scalability and maintenance.
This architecture enables Paytm to quickly add new features...read more

Asked in Shell Recharge Solutions

Q. Design a system to provide a solution for a problem by using microservices architecture.
Design a microservices architecture to solve a specific problem, ensuring scalability, maintainability, and independent deployment.
Service Decomposition: Break down the application into smaller, independent services, such as user management, payment processing, and inventory management.
API Gateway: Implement an API gateway to handle requests, route them to appropriate services, and manage cross-cutting concerns like authentication and logging.
Database per Service: Each micros...read more

Asked in Cadence Design Systems

Q. Check if rectangles overlap or not and some pointers dicsussion
Check if rectangles overlap by comparing their coordinates
Compare the x and y coordinates of the two rectangles to see if they overlap
If one rectangle is to the left of the other, or above the other, they do not overlap
If the rectangles overlap, the x and y ranges will intersect

Asked in First Citizens India

Q. Design an end-to-end payment system, explaining the components in detail.
Designing an e2e payment system with detailed component explanation
1. Define user roles and permissions (e.g. customer, merchant, admin)
2. Implement secure payment gateway integration (e.g. Stripe, PayPal)
3. Develop user-friendly interfaces for payment processing
4. Ensure data encryption and compliance with PCI DSS standards
5. Set up automated payment notifications and transaction tracking

Asked in Disney India

Q. How would you design APIs for user-based content?
Design APIs for user generated content to allow users to create, read, update, and delete their own content.
Create API endpoint for users to create new content
Read API endpoint to retrieve user's content
Update API endpoint to allow users to modify their content
Delete API endpoint to enable users to remove their content

Asked in HashedIn by Deloitte

Q. Design a database schema and application for a lending platform.
Design a lending application with a robust database schema for managing loans, users, and transactions.
Entities: Users, Loans, Payments, and Loan Types.
Users table: user_id, name, email, phone, address.
Loans table: loan_id, user_id, amount, interest_rate, start_date, end_date, status.
Payments table: payment_id, loan_id, payment_date, amount, payment_method.
Loan Types table: type_id, type_name, max_amount, min_amount, interest_rate.

Asked in Microsoft Corporation

Q. Given a Binary Search Tree (BST), count the number of nodes within a specified range.
Count nodes in a BST that fall within a specified range efficiently using recursion.
A Binary Search Tree (BST) has the property that left children are less than the parent and right children are greater.
To count nodes within a range [low, high], traverse the tree recursively.
If the current node's value is less than low, recurse right; if greater than high, recurse left.
If the current node's value is within the range, count it and recurse both left and right.
Example: For a BST...read more

Asked in VIPoint

Q. What is dns and uts architecture
DNS (Domain Name System) is a system that translates domain names to IP addresses. UTS (User Thread Scheduler) architecture manages user-level threads.
DNS is used to translate human-readable domain names (like www.example.com) to IP addresses (like 192.0.2.1).
DNS operates through a distributed database system that stores domain name records.
UTS architecture manages user-level threads in a multi-threaded environment, allowing for efficient scheduling and execution.
UTS architec...read more

Asked in upGrad

Q. Write an SQL query to fetch the progress for a given user ID and course ID.
SQL query to fetch progress for given user id and course id
Use SELECT statement to retrieve progress data
Filter results using WHERE clause with user id and course id
Join tables if progress data is stored in a separate table

Asked in Ping Identity

Q. Describe a time you fixed a rendering issue in a React project.
Fixing rendering issues in a React project often involves debugging component states and props.
Check component state: Ensure that the state is being updated correctly using setState or useState.
Verify props: Make sure that the props being passed to components are correct and not undefined.
Use React DevTools: Inspect the component tree to see if components are rendering as expected.
Check for conditional rendering: Ensure that any conditions for rendering components are being m...read more

Asked in PayPal

Q. Design the Low-Level Design (LLD) for a Flipkart shopping cart.
Design a low-level system for a shopping cart feature in Flipkart, focusing on components and interactions.
User can add, remove, or update items in the cart.
Each cart item includes product ID, quantity, and price.
Cart should support multiple users with unique sessions.
Implement a persistence layer to save cart state (e.g., Redis, database).
Consider handling promotions and discounts on cart items.
Provide an API for frontend to interact with the cart (e.g., RESTful services).
En...read more

Asked in Microsoft Corporation

Q. Given a list of words sorted in a certain way, find the order of alphabets.
Determine the order of alphabets based on a list of words sorted in a custom way.
Compare adjacent words to identify the first differing character.
The first differing character determines the order of those two letters.
Example: Given words ['abc', 'abf'], 'c' comes before 'f'.
Continue this process for all pairs of adjacent words.
Construct a directed graph to represent the order of characters.

Asked in LTIMindtree

Q. How do you handle pressure?
I handle pressure by prioritizing tasks, staying organized, seeking support when needed, and practicing stress-relief techniques.
Prioritize tasks based on deadlines and importance
Stay organized with to-do lists and calendars
Seek support from colleagues or supervisors when feeling overwhelmed
Practice stress-relief techniques such as deep breathing or exercise
Maintain a positive attitude and focus on problem-solving

Asked in NCR Corporation

Q. Write a function to delete a node in a singly linked list, given only a pointer to that node.
To delete a node in a linked list with a given pointer, update the node's value and next pointer to the next node's value and next pointer.
Set the value of the node to the value of the next node
Set the next pointer of the node to the next node's next pointer

Asked in HashedIn by Deloitte

Q. Describe how you would design the database for a ticket booking system.
Designing a database for a ticket booking system involves managing users, events, bookings, and payments efficiently.
Users table: Stores user information (e.g., user_id, name, email).
Events table: Contains event details (e.g., event_id, title, date, venue).
Bookings table: Links users to events (e.g., booking_id, user_id, event_id, seats_booked).
Payments table: Records payment transactions (e.g., payment_id, booking_id, amount, payment_status).
Venues table: Details about event...read more

Asked in Juniper Networks

Q. Code to be written on notepad not on IDE
Writing code on notepad instead of an IDE
Ensure proper indentation and formatting
Use comments to explain code
Compile and test code manually
Save frequently to avoid losing work

Asked in Microsoft Corporation

Q. Do you want to do a Puzzle round?
Yes, I enjoy solving puzzles as it challenges my problem-solving skills.
I enjoy the mental challenge of puzzles
It helps me improve my problem-solving skills
Examples: Sudoku, crosswords, logic puzzles
Interview Experiences of Popular Companies





Top Interview Questions for Software Engineer2 Related Skills

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


Reviews
Interviews
Salaries
Users

