Senior Software Engineer
3500+ Senior Software Engineer Interview Questions and Answers
Q751. what is an API? how to deploy it
API stands for Application Programming Interface. It is a set of protocols and tools for building software applications.
API is a way for different software components to communicate with each other
It defines how software components should interact with each other
API can be deployed on a server or cloud platform
API can be accessed through HTTP requests
API documentation is important for developers to understand how to use it
Q752. Coding challenge (JS) - remove duplicate entries from array
Remove duplicate entries from array of strings using JavaScript
Use Set to remove duplicates
Convert Set back to array
Use spread operator to convert Set to array
Q753. Find least common ancestor of a binary tree.
Find the lowest common ancestor of a binary tree.
Traverse the tree recursively from the root node.
If the current node is null or matches either of the given nodes, return the current node.
Recursively search for the nodes in the left and right subtrees.
If both nodes are found in different subtrees, return the current node.
If both nodes are found in the same subtree, continue the search in that subtree.
Q754. Wha are data frames What is assembly language What is dynamic programming
Data frames are a data structure used for storing and manipulating tabular data in R programming language. Assembly language is a low-level programming language that is used to write programs that can directly interact with the hardware of a computer. Dynamic programming is a technique used to solve complex problems by breaking them down into smaller subproblems and solving them recursively.
Data frames are commonly used in data analysis and statistics
Assembly language is spec...read more
Q755. Whai is useEffect hooks in React.Js. Why use empty array[]
useEffect is a hook in React that allows performing side effects in functional components.
useEffect is used to perform side effects in functional components.
It takes two arguments: a function and an array of dependencies.
The function is executed after every render cycle.
The array of dependencies is used to specify when the effect should be re-executed.
An empty array [] means the effect should only be executed once, on component mount and unmount.
Q756. What are MVC filters and how to implement?
MVC filters are used to intercept and modify HTTP requests and responses in ASP.NET MVC applications.
Filters can be used for authentication, caching, logging, exception handling, and more.
There are five types of filters: Authorization, Action, Result, Exception, and Resource.
Filters can be applied globally, to a controller, or to a specific action.
Filters can be implemented as attributes or classes that implement the appropriate interface.
Example: [Authorize] attribute can be...read more
Share interview questions and help millions of jobseekers 🌟
Q757. What is multi Threading. Oops concept.
Multithreading is the ability of a CPU to execute multiple threads concurrently.
Multithreading allows for parallel processing and can improve performance.
In object-oriented programming, multithreading can be implemented using the Thread class.
Examples of multithreaded applications include web servers and video games.
Q758. What is solid principle and describe the use Liskov principles
SOLID principles are design principles for software development. Liskov principle ensures substitutability of objects.
SOLID principles are a set of five design principles that help in creating maintainable and scalable software.
Liskov principle, named after Barbara Liskov, states that objects of a superclass should be replaceable with objects of its subclasses without affecting the correctness of the program.
It ensures that the behavior of the superclass is preserved in its s...read more
Senior Software Engineer Jobs
Q761. Find missing and repeating element in an array of 1 to n elements. N is the size of array. Solve in O-n time and O-1 space.
Find missing and repeating element in an array of 1 to n elements in O(n) time and O(1) space.
Iterate through the array and for each element, mark the element at index equal to its value as negative. If the element is already negative, it is the repeating element.
After marking all elements, the positive element's index + 1 is the missing element.
Example: Array ['1', '2', '3', '3', '5'] - Repeating element is '3' and missing element is '4'.
Q762. Class design for a cache implementation, implement get(), put(), initialization methods
Design a cache class with get(), put(), and initialization methods.
Define a class with a data structure to store key-value pairs.
Implement a get() method to retrieve a value from the cache based on a given key.
Implement a put() method to add or update a key-value pair in the cache.
Implement an initialization method to set the initial capacity and eviction policy of the cache.
Consider using a hash map or a linked list to store the key-value pairs efficiently.
Handle cache size ...read more
Q763. How can resources be shared between two node instances?
Resources can be shared between two node instances using inter-process communication methods like message passing or shared memory.
Use message passing mechanisms like sockets, message queues, or RPC to share data between node instances
Implement shared memory using techniques like memory-mapped files or shared buffers to allow direct access to shared resources
Use synchronization mechanisms like locks, semaphores, or mutexes to coordinate access to shared resources
Consider usin...read more
Q764. How to find duplicate in unsorted array
Use a hash set to keep track of seen elements and identify duplicates in an unsorted array of strings.
Iterate through the array and add each element to a hash set.
If an element is already in the hash set, it is a duplicate.
Example: ['apple', 'banana', 'apple', 'orange'] => 'apple' is a duplicate.
Q765. 1. Find the smallestMissingNumber in given array using Bitwise OR operation alone 2. Based on Array data Manipulation.
Using Bitwise OR operation to find the smallest missing number in an array.
Iterate through the array and perform Bitwise OR operation with each element to set corresponding bit in a bitmask
Iterate through the bitmask to find the first unset bit, which represents the smallest missing number
Example: Array [0, 1, 3, 4, 6] would have a bitmask of 10101, smallest missing number is 2
Q766. How does the CAN TP (Controller Area Network Transport Protocol) work?
CAN TP is a protocol used for transferring large data packets over Controller Area Network.
CAN TP breaks large data packets into smaller segments for transmission
It uses flow control mechanisms to ensure all segments are received and retransmits if necessary
CAN TP is commonly used in automotive and industrial applications
Q767. How to in parallel run cron jobs in multiple instances on a particular set of data.
Use a distributed task scheduler like Apache Airflow to run cron jobs in parallel on multiple instances.
Utilize a distributed task scheduler like Apache Airflow to manage and run cron jobs in parallel on multiple instances.
Define tasks in Airflow DAGs to specify the jobs to be executed and their dependencies.
Configure Airflow to distribute the tasks across multiple worker nodes for parallel execution.
Monitor the execution of tasks and view logs in Airflow's web interface.
Exam...read more
Q768. What are distributes transactions and how these can be handled in microservices
Distributed transactions involve multiple systems coordinating to ensure data consistency across different services in a microservices architecture.
Distributed transactions involve multiple services or databases working together to ensure data consistency.
In microservices, handling distributed transactions can be challenging due to the decentralized nature of the architecture.
One approach to handling distributed transactions in microservices is using compensating transactions...read more
Q769. Can you explain the internal workings of a hashmap?
A hashmap is a data structure that stores key-value pairs and uses a hash function to map keys to their corresponding values.
Hashmap uses a hash function to determine the index of the key-value pair in the underlying array.
Collisions can occur when multiple keys hash to the same index, which is resolved using techniques like chaining or open addressing.
Hashmaps offer constant time complexity O(1) for insertion, deletion, and retrieval operations on average.
Q770. difference between collections and steraming and how performance improved using streaming api
Collections store data while streaming processes data in a sequential manner. Streaming API improves performance by reducing memory usage and increasing efficiency.
Collections store data in memory while streaming processes data in a sequential manner without storing it.
Streaming API allows for lazy evaluation, meaning data is processed only when needed, reducing memory usage.
Streaming API can improve performance by enabling parallel processing of data, increasing efficiency.
E...read more
Q771. Find 2nd Element from sql without using where caluse.
Finding 2nd element from SQL without using WHERE clause.
Use OFFSET and LIMIT clauses to skip the first row and select the second row.
Order the result set by the desired column.
Example: SELECT column_name FROM table_name ORDER BY column_name OFFSET 1 LIMIT 1;
Q772. How to separate unique and Duplicates in file using Datastage!?
Use Datastage to separate unique and duplicate records in a file.
Use a transformer stage to create two output links - one for unique records and one for duplicate records.
Sort the input data by the key field(s) that determine uniqueness.
Use a Remove Duplicates stage on the sorted data to filter out duplicates.
Join the original data with the output of the Remove Duplicates stage to separate unique and duplicate records.
Example: Input file with customer data, sort by customer I...read more
Q773. what is transaction management and how is it handled in microservices
Transaction management is the process of ensuring data consistency and integrity in a system.
In microservices, each service has its own database, making distributed transactions challenging.
Two popular approaches to handle transaction management in microservices are Saga pattern and two-phase commit protocol.
Saga pattern involves breaking a transaction into multiple smaller transactions that can be rolled back individually if needed.
Two-phase commit protocol ensures that all ...read more
Q774. 1. Write a code to reverse a linked list?
Code to reverse a linked list
Create three pointers: prev, curr, and next
Initialize prev to null and curr to head
Loop through the list and set next to curr's next node
Set curr's next node to prev
Move prev and curr one node ahead
Return prev as the new head
Q775. Explain technical challenges you have come across and how did you overcome it?
I faced a technical challenge while implementing a complex algorithm for real-time data processing.
Identified the bottleneck in the algorithm by profiling the code
Optimized the algorithm by implementing data structures and algorithms with lower time complexity
Tested the optimized solution thoroughly to ensure correctness and performance
Collaborated with team members to brainstorm alternative approaches
Q776. Have you implemented any Android sdk in the projects
Yes, I have implemented Android SDK in multiple projects.
I have used Android SDK to develop various features like push notifications, location services, and in-app purchases.
I have also integrated third-party SDKs like Facebook and Google Maps SDKs in my projects.
I am familiar with Android Studio and have used it extensively for Android app development.
I have experience with different versions of Android SDK and have developed apps for both smartphones and tablets.
Q777. How the sales order will cancel which was already invoiced
The sales order can be cancelled by creating a credit memo against the invoice.
Create a credit memo against the invoice for the amount of the invoice.
Ensure that the credit memo is linked to the original sales order.
Update the sales order status to reflect the cancellation.
If any goods have already been shipped, ensure that they are returned and the inventory is updated.
If any payment has been received, issue a refund to the customer.
Q778. How to implement Singleton and Factory pattern in Java
Singleton and Factory patterns are creational patterns used in Java to create objects.
Singleton pattern ensures that only one instance of a class is created and provides a global point of access to it.
Factory pattern provides an interface for creating objects, but allows subclasses to decide which class to instantiate.
Singleton pattern can be implemented using private constructor, static method and static variable.
Factory pattern can be implemented using an interface or abstr...read more
Q779. What is custom middleware in .net core
Custom middleware in .NET Core is a piece of code that sits between the request and response pipeline to perform custom operations.
Custom middleware can be used to add custom headers, logging, authentication, and authorization to the request pipeline.
Middleware can be added to the pipeline using the Use() method in the Startup.cs file.
Middleware can be created using classes that implement the IMiddleware interface or by using lambda expressions.
Middleware can be ordered in th...read more
Q780. What is Garbage collection? Explain
Garbage collection is an automatic memory management process that frees up memory occupied by objects that are no longer in use.
Garbage collection is a process of identifying and freeing up memory that is no longer in use by the program.
It is done automatically by the programming language runtime environment.
Garbage collection helps prevent memory leaks and improves program performance.
Examples of programming languages that use garbage collection are Java, Python, and Ruby.
Q781. Why String is immutable? Spring boot annotations and it's used? Internal working of hashmap? Arraylist and Linked list? REST APIs and it's methods?
Explaining immutability of String and other software engineering concepts
String is immutable to ensure thread safety and prevent unintended modification
Spring boot annotations simplify configuration and reduce boilerplate code
Hashmap uses hashing to store and retrieve key-value pairs efficiently
Arraylist and Linked list are both used to store collections of objects, but have different performance characteristics
REST APIs use HTTP methods (GET, POST, PUT, DELETE) to interact w...read more
Q782. Write a code to find odd or even without if else.
Code to find odd or even without if else.
Use bitwise operator & to check if the last bit is 1 or 0
Store the result in an array of strings
Access the array using the result as index
Q783. Find the total no of the island in a 2d matrix. Working code was required.
Find the total no of islands in a 2D matrix.
Use DFS or BFS to traverse the matrix.
Mark visited cells to avoid repetition.
Count the number of islands found.
Q784. Use robot to move boxes in sorted order according to box id. Box id is in range 1000
Using a robot to sort boxes by their ID in ascending order.
Create a list of boxes with their IDs
Program the robot to pick up boxes based on their ID
Use a sorting algorithm to sort the list of boxes by ID
Program the robot to move the boxes in the sorted order
Q785. What if auth token expires during a call. How do we retry?
Retry the call with a new auth token
Check if the auth token has expired during the call
Generate a new auth token
Retry the call with the new auth token
Q786. What is the difference between truncate and delete in mySQL How to truncate a table in MySQL Methodology used in your project like agile etc
Truncate removes all data from a table while delete removes specific rows.
Truncate is faster than delete as it doesn't log individual row deletions
Truncate resets auto-increment values while delete doesn't
To truncate a table in MySQL, use the TRUNCATE TABLE statement
Methodology used in my project was Agile
Q787. How would you implement breaking changes in the application?
Breaking changes can be implemented by following a structured process to minimize impact on users.
Communicate the changes to stakeholders in advance
Provide detailed documentation on the changes and how to adapt to them
Implement versioning to allow users to choose when to adopt the changes
Use feature flags to gradually roll out the changes and monitor impact
Run thorough testing to ensure the changes do not introduce new bugs
Q788. How to call default method of interface if class implemented multiple interfaces.
To call a default method of an interface when a class implements multiple interfaces, use the interface name followed by the method name.
Use InterfaceName.super.methodName() to call the default method of a specific interface.
If a class implements multiple interfaces with default methods of the same name, you must specify the interface name to call the desired method.
Example: Interface1.super.defaultMethod() to call the defaultMethod() of Interface1.
Q789. How do you use dependecy injection? What are advantages?
Dependency injection is a design pattern used to remove hard-coded dependencies and make code more modular and testable.
Dependency injection is achieved by passing dependencies to a class or method through its constructor or method parameters.
Advantages include increased modularity, easier testing, and reduced coupling between components.
Examples of dependency injection frameworks include Spring and Guice for Java, and Angular for JavaScript.
Dependency injection can also be d...read more
Q790. Diff between const and val, parcelable and serialisation, how to reduce gradle build time.
const vs val: const is compile-time constant, val is runtime constant. Parcelable vs Serialization: Parcelable is faster, Serialization is more flexible. Reduce gradle build time by optimizing dependencies and using build cache.
const is a compile-time constant in Kotlin, its value is determined at compile time and cannot be changed. val is a runtime constant, its value is determined at runtime but cannot be reassigned.
Parcelable is an Android-specific interface used for passi...read more
Q791. How to controll the text input without using use state in react native
You can control text input in React Native without using useState by utilizing refs.
Use refs to access and manipulate the text input directly
Set up a ref for the text input component and use ref.current.value to get the current value
You can also use ref.current.focus() to focus on the text input programmatically
Q792. How we can handle fault tolerance in Microservices?
Fault tolerance in Microservices can be achieved through redundancy, graceful degradation, and circuit breakers.
Implementing redundancy by having multiple instances of each microservice running to handle failures.
Using graceful degradation to ensure that the system can still function even if certain microservices are unavailable.
Utilizing circuit breakers to prevent cascading failures by temporarily stopping requests to a failing microservice.
Q793. What is difference between @primary and @Qualifier?
Primary is used to define a primary bean when multiple beans of the same type are present, while Qualifier is used to specify which bean to autowire when multiple beans of the same type are present.
Primary annotation is used to give a higher preference to a bean when multiple beans of the same type are present in the Spring application context.
Qualifier annotation is used to specify which bean to autowire when multiple beans of the same type are present. It helps in resolving...read more
Q794. What is RPA and its applications?
RPA stands for Robotic Process Automation, which involves using software robots to automate repetitive tasks.
RPA can be used to automate tasks such as data entry, invoice processing, customer service inquiries, and more.
RPA can help improve efficiency, accuracy, and productivity in various industries such as finance, healthcare, and manufacturing.
Examples of RPA tools include UiPath, Blue Prism, and Automation Anywhere.
Q795. Write Angular code to call web api and show the data in the ui
Use Angular HttpClient to call web api and display data in UI
Create a service in Angular to make HTTP requests using HttpClient module
Subscribe to the observable returned by HttpClient.get() method to fetch data
Bind the fetched data to UI elements in the component template
Q796. How to list out relevant files from a folder which was updated in a given time period
Use a script to list relevant files updated within a given time period in a folder
Use a scripting language like Python or Bash to iterate through files in the folder
Check the last modified timestamp of each file and compare it to the given time period
Create a list of files that meet the criteria and display or output them
Q797. how would you design a system that needs to handle million of records
I would design a system using scalable architecture, efficient data storage, and optimized query processing.
Utilize a distributed database system like Cassandra or Hadoop for storing large volumes of data
Implement data partitioning and sharding to distribute the data across multiple servers
Use indexing and caching mechanisms to optimize query performance
Employ load balancing techniques to evenly distribute incoming requests
Implement data compression and encryption to reduce s...read more
Q798. What is the low-level design of a movie booking application?
The low-level design of a movie booking application involves components like user authentication, seat selection, payment processing, and ticket generation.
Implement user authentication to allow users to log in and book tickets.
Create a seat selection feature where users can choose their preferred seats.
Integrate payment processing to facilitate secure transactions.
Generate tickets with unique identifiers for each booking.
Include features like seat availability updates in rea...read more
Q799. How to monitor performance to investigate a long loading site pages issue
Monitor performance using tools like Chrome DevTools, Lighthouse, and server-side monitoring tools
Use Chrome DevTools to analyze network requests, CPU usage, and memory consumption
Run Lighthouse audits to identify performance bottlenecks and opportunities for improvement
Utilize server-side monitoring tools like New Relic or Datadog to track server response times and database queries
Interview Questions of Similar Designations
Top Interview Questions for Senior Software Engineer 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