Software Engineer2
100+ Software Engineer2 Interview Questions and Answers

Asked in Convergent Science

Q. - Given a water -tight orientable 2-manifold, how to find if a point is inside or outside its volume? - Given a bunch of points with their coordinates, how to merge closeby points together? - How to determine i...
read moreAnswering technical questions for Software Engineer 2 position
To determine if a point is inside or outside a 2-manifold, use the ray casting algorithm
To merge closeby points, use clustering algorithms like k-means or DBSCAN
To determine if the normals of two triangles are wrongly oriented, use the cross product of their edges
Favorite research paper and why

Asked in Wayfair

Q. Describe how you would design an Order and Cart Page in iOS, including classes, network requests, APIs, and information flow. The user should be able to order an item, see it in the cart, with a limit of 1 per...
read moreDesign an Order and Cart Page in iOS with limit of 1 item per order.
Create classes for Order, Cart, Item
Implement network requests to fetch item details
Use APIs to add item to cart and place order
Design information flow from selecting item to placing order
Software Engineer2 Interview Questions and Answers for Freshers

Asked in JioStar

Q. Given an array of officers, where ranks 1-8 represent high-ranking officers (each appearing once) and other numbers represent low-ranking officers (appearing multiple times), separate the high-ranking and low-r...
read moreSeparate high rank (1-8) and low rank officers in O(n) time and O(1) space.
Use two pointers: one for high rank and one for low rank.
Iterate through the array, placing high rank officers at the start.
Example: For array [3, 1, 5, 2, 9, 3, 4], result could be [3, 1, 5, 2, 4, 9, 3].
Low rank officers can be identified by checking if the number is greater than 8.
Maintain the order of high rank officers while moving low rank officers to the end.

Asked in Disney India

Q. How to process large amount of data? Which tool would you prefer?
To process large amount of data, use tools like Apache Hadoop, Apache Spark, or Google BigQuery.
Utilize distributed computing frameworks like Apache Hadoop or Apache Spark for parallel processing of data
Consider using cloud-based solutions like Google BigQuery for scalability and cost-effectiveness
Optimize data processing pipelines by using tools like Apache Kafka for real-time data streaming
Implement data compression techniques to reduce storage and processing overhead

Asked in PayPal

Q. Can you describe the system design for the checkout feature on Amazon, including the request body, API calls, load balancing, database caching, and content delivery network (CDN) considerations?
The system design for the checkout feature on Amazon involves request body, API calls, load balancing, database caching, and CDN considerations.
Request body includes user's selected items, shipping address, payment details, etc.
API calls are made to process payment, update inventory, and send confirmation emails.
Load balancing ensures even distribution of traffic across multiple servers to handle checkout requests efficiently.
Database caching helps in storing frequently acces...read more

Asked in ZeMoSo Technologies

Q. Given an integer array and a target value k, find a pair of elements in the array whose sum equals k.
Find pair of elements in array whose sum is equal to target k.
Use a hashmap to store the difference between target k and each element in the array.
Iterate through the array and check if the current element's complement exists in the hashmap.
Return the indices of the pair that sums up to target k.
Software Engineer2 Jobs



Asked in Instawork India

Q. How would a live migration occur in a production database where 100% uptime is expected?
Live migration in a production database with 100% uptime
Use database replication to create a secondary database that mirrors the primary one
Gradually switch traffic from the primary to the secondary database
Once traffic is fully switched, perform the migration on the primary database
Switch traffic back to the primary database once migration is complete
Monitor for any issues during the migration process

Asked in Convergent Science

Q. How can you determine if an array contains duplicate elements in linear time?
To find duplicates in an array of strings in linear time
Create a hash table to store the frequency of each string
Iterate through the array and check if the frequency of any string is greater than 1
If yes, then it is a duplicate
Return true if duplicates are found, else false
Share interview questions and help millions of jobseekers 🌟

Asked in JPMorgan Chase & Co.

Q. What is the difference between an abstract class and an interface? Give a use case for both.
Abstract class allows partial implementation while interface allows full abstraction.
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
A class can only extend one abstract class, but can implement multiple interfaces.
Abstract class is used when some common functionality needs to be shared among subclasses, while interface is used to define a contract for classes to implement.
Example: Abstract class 'Shape' with abst...read more

Asked in JPMorgan Chase & Co.

Q. What is TDD and BDD? What are the differences and which one do you prefer?
TDD stands for Test-Driven Development and BDD stands for Behavior-Driven Development. TDD focuses on writing tests before writing code, while BDD focuses on the behavior of the system.
TDD involves writing a failing test, writing code to make the test pass, and then refactoring the code.
BDD focuses on defining the behavior of the system through examples written in a specific format like Given-When-Then.
TDD is more developer-centric, while BDD involves collaboration between de...read more

Asked in Procore

Q. What is the implementation process for insertion, deletion, and updating operations in a hybrid tree plus queue data structure?
Hybrid tree plus queue combines tree structure for hierarchy and queue for order, enabling efficient insertions, deletions, and updates.
Insertion: Add new nodes to the tree; if a node exceeds capacity, split and enqueue excess to maintain balance.
Deletion: Remove nodes from the tree; if a node is deleted, re-balance by promoting a child or merging with a sibling.
Updating: Locate the node in the tree, modify its value, and ensure the tree properties are preserved.
Example: Inse...read more

Asked in Hewlett Packard Enterprise

Q. What are different framework models for effective communication between the control plane and the data plane?
Explore frameworks for efficient communication between control and data planes in software systems.
Use RESTful APIs for stateless communication between control and data planes.
Implement gRPC for high-performance, bi-directional streaming communication.
Utilize message queues (e.g., RabbitMQ, Kafka) for asynchronous communication.
Adopt a publish-subscribe model to decouple control and data planes, enhancing scalability.
Consider using WebSockets for real-time communication needs...read more
Asked in Instawork India

Q. How would you optimize a frequently searched items list?
Optimise frequently searched items list by implementing caching, indexing, and prioritising popular items.
Implement caching to store frequently searched items in memory for quick access.
Use indexing to efficiently search and retrieve items from the list.
Prioritise popular items by tracking search frequency and displaying them prominently.
Consider implementing autocomplete or predictive search to suggest items as users type.
Regularly update the list based on search trends to e...read more

Asked in VIPoint

Q. How would you handle a customer request to upgrade MySQL?
I would assess the impact of the upgrade, plan the process, communicate with the customer, and ensure a smooth transition.
Assess the current version of MySQL and the customer's requirements for the upgrade
Plan the upgrade process including backups, testing, and rollback procedures
Communicate with the customer about the timeline, potential downtime, and any impact on their system
Ensure a smooth transition by monitoring the upgrade process and addressing any issues promptly

Asked in JPMorgan Chase & Co.

Q. What has been your experience with framework design and implementation?
I have extensive experience in designing and implementing frameworks for various software projects.
Designed and implemented a custom testing framework for automated testing of web applications.
Utilized Spring framework for developing enterprise applications, including dependency injection and aspect-oriented programming.
Contributed to the design and implementation of a microservices architecture using Netflix OSS frameworks like Eureka and Zuul.

Asked in VIPoint

Q. Describe website-related errors you've encountered and how you handled them.
Handling website errors involves identifying, logging, and resolving issues to ensure a smooth user experience.
Implement error logging to capture details of the error (e.g., stack traces, user actions).
Use user-friendly error pages (e.g., 404 pages) that guide users back to functional areas.
Monitor application performance and errors using tools like Sentry or New Relic.
Implement retry mechanisms for transient errors (e.g., network issues).
Conduct regular code reviews and test...read more

Asked in Pluralsight

Q. Create cusom hook in react Explain react's virtual DOM Sort an array
Creating custom hook, explaining virtual DOM, sorting an array in React
To create a custom hook in React, you can define a function that starts with 'use' and can be reused across components.
React's virtual DOM is a lightweight copy of the actual DOM, which allows React to efficiently update the real DOM.
To sort an array in JavaScript, you can use the built-in 'sort' method or write a custom sorting function.

Asked in ZeMoSo Technologies

Q. Given an input string "aaabbCCaaDD", output "a3b2C2a2D2". Find the frequency of subsequent characters.
The task is to find the frequency of subsequent characters in a given input string.
Iterate through the input string while keeping track of the current character and its frequency.
If the current character is the same as the previous character, increment the frequency count.
If the current character is different, append the previous character and its frequency to the output string.
Repeat until the end of the input string is reached.

Asked in Bristol-Myers Squibb

Q. How do you concatenate three columns and handle null values using SQL? For example: select concat(a, b, c) from table.
Concatenate 3 columns and handle null values in SQL query
Use CONCAT_WS function to concatenate columns and handle null values
Provide a separator as the first argument in CONCAT_WS function
Use IFNULL function to replace null values with a specified value

Asked in Philips

Q. Write a function to generate string permutations with at least 3 letters, where the first letter is a vowel.
Generate string permutations with first letter as vowel and atleast 3 letters
Create a list of vowels and a list of consonants
Generate all possible permutations of length 3 or more using itertools.permutations
Filter out permutations that do not start with a vowel
Join the remaining permutations into strings
Asked in ESCRIBA AG

Q. how is react different from angular ? write a custom component in angular
React is a JavaScript library for building user interfaces, while Angular is a full-fledged framework for building web applications.
React is a library, while Angular is a framework
React uses a virtual DOM for performance optimization, while Angular uses two-way data binding
React components are simpler and more flexible, while Angular components are more opinionated and structured
Angular has a built-in dependency injection system, while React relies on external libraries for s...read more

Asked in Disney India

Q. How do you process a large amount of logs?
Process large amount of logs by using log aggregation tools like ELK stack or Splunk.
Utilize log aggregation tools like ELK stack (Elasticsearch, Logstash, Kibana) or Splunk to collect, index, search, and visualize logs.
Implement proper log rotation and retention policies to manage the volume of logs efficiently.
Leverage distributed systems and parallel processing to handle large volumes of logs effectively.
Use filtering and parsing techniques to extract relevant information ...read more

Asked in ZeMoSo Technologies

Q. What is an actuator in Spring Boot, and what are the actuator endpoints?
Actuator in Spring Boot provides production-ready features like monitoring and metrics.
Actuator is a set of tools provided by Spring Boot to monitor and manage your application.
Actuator endpoints are URLs that provide information about your application, such as health, metrics, info, etc.
Examples of actuator endpoints include /actuator/health, /actuator/metrics, /actuator/info, etc.


Q. Design a system to read logs from a file and send them to a client in near real-time. The log file is too large to be fully loaded into memory.
Design a system to read large log files and send updates to clients in near real-time without loading the entire file into memory.
Use a file streaming approach to read logs line by line.
Implement a buffer to store recent log entries before sending to the client.
Utilize a message queue (e.g., Kafka, RabbitMQ) for real-time log distribution.
Consider using a tailing mechanism to monitor new log entries as they are written.
Ensure proper error handling and reconnection strategies ...read more

Asked in Xplor Technologies

Q. How would you approach resolving an issue or bug, or implementing a new feature?
I follow a systematic approach to identify, analyze, and resolve issues or implement features effectively.
1. Identify the issue: Reproduce the bug or understand the feature requirements clearly.
2. Analyze the problem: Use debugging tools or logs to pinpoint the root cause.
3. Research solutions: Look for similar issues in documentation or online resources.
4. Implement the fix or feature: Write code, ensuring to follow best practices and coding standards.
5. Test thoroughly: Run...read more

Asked in Infosys

Q. What technologies are you interested in?
I am interested in technologies related to artificial intelligence, machine learning, and cloud computing.
Artificial Intelligence
Machine Learning
Cloud Computing

Asked in Skillsoft Software Services

Q. Find all unique pairs of elements in an array that sum up to a given number? Binary search Linked list
Find unique pairs in an array that sum to a target value using efficient algorithms like binary search.
Use a Hash Set: Store elements in a set while iterating through the array to check for complements. Example: For array [1, 2, 3, 4] and target 5, pairs are (1,4) and (2,3).
Sort and Use Two Pointers: Sort the array and use two pointers to find pairs. Example: For sorted array [1, 2, 3, 4] and target 5, start with pointers at both ends.
Binary Search: After sorting, for each el...read more

Asked in LTIMindtree

Q. What are the methods for enabling communication between microservices?
Methods for enabling communication between microservices
RESTful APIs
Message queues (e.g. RabbitMQ, Kafka)
gRPC (Google Remote Procedure Call)
Service mesh (e.g. Istio, Linkerd)
Event-driven architecture (e.g. using Apache Kafka)

Asked in JPMorgan Chase & Co.

Q. Write a program to check if the sum of the digits of a given number is a prime number.
Program to check if sum of digits of a number is prime
Convert the number to a string to iterate through each digit
Calculate the sum of digits
Check if the sum is a prime number

Asked in Morgan Stanley

Q. Write a program to find the frequency of each word in a sentence.
Program to find frequency of words in a sentence
Split the sentence into words using space as delimiter
Create a map to store word frequencies
Iterate through the words and update the map accordingly
Handle case sensitivity and punctuation if needed
Interview Experiences of Popular Companies





Top Interview Questions for Software Engineer2 Related Skills



Reviews
Interviews
Salaries
Users

