Software Engineer2
90+ Software Engineer2 Interview Questions and Answers
Q1. - 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
Q2. 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
Software Engineer2 Interview Questions and Answers for Freshers
Q3. Given an integer array , and a target k , we need to find the pair of elements from array whose sum will be equal to target 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.
Q4. How to find if an array has duplicates, 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
Q5. How will 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
Q6. How will you optimise 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
Share interview questions and help millions of jobseekers 🌟
Q7. How you will handle if a customer requesting for a mysql upgrade
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
Q8. 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.
Software Engineer2 Jobs
Q9. String permutations with atleast 3 letters in it and first letter 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
Q10. How to process 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
Q11. Given an input string "aaabbCCaaDD" , O/p : a3b2C2a2D2 , we need to 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.
Q12. concat 3 columns and handle when null: 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
Q13. 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.
Q14. What teconologies are you interested in ?
I am interested in technologies related to artificial intelligence, machine learning, and cloud computing.
Artificial Intelligence
Machine Learning
Cloud Computing
Q15. Coding challenges with screen sharing.
Coding challenges with screen sharing involve solving programming problems while sharing your screen with an interviewer.
Prepare by practicing coding challenges beforehand
Ensure your internet connection and screen sharing software are working properly
Communicate your thought process and ask questions during the challenge
Test your code thoroughly before submitting
Be open to feedback and suggestions from the interviewer
Q16. 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
Q17. What is the difference between abstract and 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
Q18. How you will check the load issue 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
Q19. 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
Q20. On what basis would you consider sharding the database on
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
Q21. find the number of ways to reach to rightmost cell from topmost cell in 2D matrix
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.
Q22. 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
Q23. 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
Q24. 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.
Q25. 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
Q26. Design a e2e payment system with components explanation 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
Q27. 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
Q28. 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
Q29. Delete the node in a linked list with given pointer
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
Q30. 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
Q31. 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
Q32. How you can handle the 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
Q33. Currying in javascript and implement the sum(1)(2)(3)(4)......
Currying in JavaScript is a technique of transforming a function that takes multiple arguments into a sequence of functions, each taking a single argument.
Create a function that takes a single argument and returns a new function that takes the next argument.
Repeat this process until all arguments are received and then return the final result.
Example: function sum(a) { return function(b) { return function(c) { return function(d) { return a + b + c + d; }; }; }; } sum(1)(2)(3)(...read more
Q34. Cloning a Singly Linked List with Random Pointers
Cloning a singly linked list with random pointers involves creating a deep copy of the list while maintaining the random pointers.
Create a new node for each node in the original list and insert it next to the original node.
Update the random pointers of the new nodes to point to the corresponding new nodes.
Separate the original and cloned lists by adjusting the next pointers.
Q35. Generate the Permutations for the given String
Generate permutations of a given string
Use recursion to generate all possible permutations
Swap characters in the string to create different permutations
Base case: when the string length is 1, return the string as a permutation
Q36. DSA question to find maximum subarray sum
Find the maximum subarray sum using Kadane's algorithm
Initialize max_sum and current_sum to 0
Iterate through the array and update current_sum by adding the current element
If current_sum becomes negative, reset it to 0
Update max_sum if current_sum is greater than max_sum
Q37. Find distinct without distinct keyword in SQL
Use GROUP BY to find distinct values in SQL without using the DISTINCT keyword.
Use GROUP BY clause with all columns in the SELECT statement
This will group the rows with the same values together, effectively giving distinct values
Q38. 2 Entities for cross site sale promotion.
Two entities for cross site sale promotion are affiliate marketing platform and customer loyalty program.
Affiliate marketing platform: Allows businesses to partner with affiliates who promote their products on their own websites in exchange for a commission.
Customer loyalty program: Rewards customers for repeat purchases or other actions, encouraging them to continue shopping with the brand.
Q39. Branching strategies in Agile methodologies
Branching strategies in Agile methodologies involve creating separate branches for different features or tasks to enable parallel development.
Feature branching: Each feature or user story is developed in a separate branch, allowing for isolation and independent testing.
Release branching: A branch is created for each release, enabling bug fixes and maintenance to be done separately from ongoing development.
Task branching: Developers create branches for individual tasks or sub-...read more
Q40. Design pattern of microservices architecture
Microservices architecture is a design pattern where an application is composed of small, independent services that communicate over well-defined APIs.
Each microservice is responsible for a specific business function or capability
Services are loosely coupled and can be developed, deployed, and scaled independently
Communication between services is typically done through lightweight protocols like HTTP or messaging queues
Microservices architecture promotes flexibility, scalabil...read more
Q41. What is es6 in javascript language
ES6, also known as ECMAScript 2015, is the sixth major release of the JavaScript language that introduced new features and syntax improvements.
Introduced let and const for variable declarations
Added arrow functions for more concise syntax
Included classes for object-oriented programming
Introduced template literals for easier string interpolation
Added default parameters and rest parameters for functions
Q42. Memory concepts in C and IPC
Memory concepts in C and IPC involve understanding memory management in C programming and inter-process communication techniques.
Memory management in C involves concepts like stack, heap, and static memory allocation.
IPC techniques include shared memory, message queues, and semaphores for communication between processes.
Understanding pointers and memory allocation is crucial for efficient memory management in C programming.
Examples: Using malloc() and free() for dynamic memor...read more
Q43. Implement BFS to find the nearest neighbour
Implement BFS algorithm to find the nearest neighbour
Create a queue to store nodes to be visited
Start with the initial node and add it to the queue
While the queue is not empty, dequeue a node, visit its neighbours, and add them to the queue
Repeat until the nearest neighbour is found
Q44. How does a DFS work?
DFS is a graph traversal algorithm that explores as far as possible along each branch before backtracking.
DFS stands for Depth First Search.
It starts at the root node and explores as far as possible along each branch before backtracking.
It uses a stack to keep track of the visited nodes.
It can be implemented recursively or iteratively.
It is used in finding connected components, topological sorting, and solving puzzles like the maze problem.
Q45. Kadane's Algorithm (maximum subarray sum)
Kadane's Algorithm is used to find the maximum sum of a contiguous subarray within an array of integers.
Initialize two variables: max_so_far and max_ending_here to track the maximum sum.
Iterate through the array and update max_ending_here by adding the current element or starting a new subarray.
Update max_so_far if max_ending_here becomes greater than max_so_far.
Return max_so_far as the maximum subarray sum.
Q46. reverse a linked list in k sizes
Reverse a linked list in k sizes
Break the linked list into groups of size k
Reverse each group individually
Connect the reversed groups back together
Q47. Difference Between stateless and Stateful widgets
Stateless widgets do not store any state information, while stateful widgets can hold and update state data.
Stateless widgets are immutable and do not change their state during the build process.
Stateful widgets can hold and update state data, causing them to rebuild when the state changes.
Stateless widgets are more efficient as they do not need to manage state information.
Stateful widgets are useful for interactive UI components that need to update based on user input.
Exampl...read more
Q48. Send 0s to the back of the array.
Move all 0s to the end of the array while maintaining the order of other elements.
Iterate through the array and keep track of the index to place non-zero elements.
After iterating, fill the remaining positions with 0s.
Q49. Opps concept. One easy dsa on finding duplicate
OOPs concept and finding duplicates in an array of strings
Explain OOPs concepts like inheritance, polymorphism, encapsulation, and abstraction
To find duplicates in an array of strings, use a HashSet to store unique elements and a List to store duplicates
Iterate through the array and check if the element is already in the HashSet, if yes, add it to the List of duplicates
Q50. Explain React's virtual DOM
React's virtual DOM is a lightweight copy of the actual DOM, used for efficient updates and rendering.
Virtual DOM is a representation of the actual DOM in memory.
React compares the virtual DOM with the actual DOM to determine the minimal changes needed for updates.
Changes are then batched and applied to the actual DOM for efficient rendering.
Top Interview Questions for Software Engineer2 Related Skills
Interview experiences of popular companies
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/Month