Senior Software Engineer
200+ Senior Software Engineer Interview Questions and Answers for Freshers

Asked in Avalara Technologies

Q. Given an array of n elements and a value k, find the kth largest element in subarrays ranging from index 0 to k, 0 to k+1, ..., 0 to n.
Find the Kth largest element in multiple subarrays of a given array.
Use a max-heap or min-heap to efficiently track the Kth largest element.
For each subarray from index 0 to i, where i ranges from k to n, extract the Kth largest element.
Example: For array [3, 2, 1, 5, 6, 4] and k=2, subarrays are [3, 2], [3, 2, 1], [3, 2, 1, 5], etc.
The Kth largest element for each subarray can be found using sorting or a heap data structure.

Asked in Firstsource Solutions

Q. How do you create GQL server, directive in GQL, Fragments in GQL how do you write unit tests for gql Queries/mutations (on the server side) TypeScript: Partial, Decorators, unions, Generics useCallback vs useMe...
read moreAnswering questions related to creating GQL server, directives, fragments, unit tests, TypeScript features, and React.js functionalities.
To create a GQL server, you can use tools like Apollo Server or Express with GraphQL middleware.
Directives in GQL are used to modify the behavior of a field or fragment in a query. For example, @include and @skip are common directives.
Fragments in GQL allow you to define reusable units of query logic. They can be included in queries to avoid...read more

Asked in Arcesium

Q. Given a grid representing an ocean (where mat[i][j] = 1 represents an island and mat[i][j] = 0 represents water), find the island with the largest area.
Find the largest island area in a grid representing an ocean using DFS or BFS.
Use Depth-First Search (DFS) or Breadth-First Search (BFS) to explore the grid.
Mark visited cells to avoid counting them multiple times.
Count the size of each island during the traversal.
Example: For a grid [[1,0,0],[1,1,0],[0,0,1]], the largest island has area 3.
Keep track of the maximum area found during the exploration.

Asked in Avalara Technologies

Q. Write an API to implement HTTP GET method to hit an external datasource using pagination and filter the top-rated movie in a certain Genre. There will be around 2000 entries of data objects related to movies, a...
read moreImplement an API in Java to fetch top rated movies in a certain genre from an external datasource using pagination.
Create a REST API endpoint in Java using Spring Boot framework
Implement pagination by using query parameters for 'page' and 'size'
Filter the movies by genre and sort them by rating to fetch the top rated ones
Use a service layer to interact with the external datasource and fetch the data
Return the filtered and paginated movie data in the response

Asked in LTIMindtree

Q. Explain microservice architecture and how to implement it using Spring Boot.
Microservice architecture is a design approach where an application is composed of small, independent services that communicate over well-defined APIs.
Break down the application into smaller, loosely coupled services that can be developed, deployed, and scaled independently.
Each service focuses on a specific business capability and communicates with other services through APIs.
Spring Boot provides a convenient framework for building microservices by offering features like emb...read more

Asked in Tech Mahindra

Q. How many projects or processes have you implemented in the RE framework?
I have implemented RE framework in 3 projects.
Implemented RE framework in 3 projects
Used RE framework for automating end-to-end processes
Leveraged RE framework's modular structure for easy maintenance
Examples: Invoice processing, Order management, HR onboarding
Senior Software Engineer Jobs




Asked in HCLTech

Q. Find the second highest number by using Java Stream, What are the new changes in Java 8 from Java 7. HashMap and HashSet internal implementation.
Using Java Stream to find the second highest number, Java 8 changes, HashMap and HashSet internal implementation.
Use Java Stream to sort the numbers in descending order and skip the first element to get the second highest number.
Java 8 introduced lambda expressions, functional interfaces, Stream API, default methods in interfaces, and new Date and Time API.
HashMap uses buckets to store key-value pairs, while HashSet uses HashMap internally to store unique elements.
HashMap all...read more

Asked in Firstsource Solutions

Q. Create a small machine coding assignment to solve in an online IDE that fetches data from an API and displays the results. Include a search input box at the top where users can search for items.
Create a web app to fetch data from an API and implement a search feature for user interaction.
Use Fetch API to retrieve data from a public API, e.g., JSONPlaceholder.
Implement a search input box that filters results based on user input.
Display results in a user-friendly format, such as a list or table.
Handle loading states and errors gracefully to enhance user experience.
Consider using a framework like React or Vue.js for better state management.
Share interview questions and help millions of jobseekers 🌟

Asked in IQVIA

Q. Design an Employee-Manager class. Write a method to display the employee organizational hierarchy like we see in Microsoft Teams Org tab.
Design an employee-Manager class and write a method to display employee organizational hierarchy.
Create an Employee class with attributes like name, id, managerId, etc.
Create a Manager class that inherits from Employee class and has a list of employees under them.
Write a method to display the hierarchy using recursion.
Use a data structure like a dictionary to store the employees and their managers.
Consider edge cases like circular references and missing managers.

Asked in Wissen Technology

Q. Write a JavaScript function that returns the letter with the maximum and minimum occurrences in a string.
A javascript function to find the maximum and minimum occurrence of a letter in a string.
Create an object to store the count of each letter in the string
Loop through the string and update the count in the object
Find the maximum and minimum count in the object and return the corresponding letters

Asked in Arcesium

Q. Given an unsorted array of integers, find the smallest missing positive integer.
Find first missing positive integer from an array of non-negative integers.
Create a hash set to store all positive integers in the array
Loop through the array and add all positive integers to the hash set
Loop through positive integers starting from 1 and return the first missing integer not in the hash set

Asked in LTIMindtree

Q. What is a Functional Interface and how do you implement it?
Functional interface is an interface with only one abstract method, can be implemented using lambda expressions.
Functional interface has only one abstract method
Can be implemented using lambda expressions
Used in Java to achieve functional programming

Asked in Globant

Q. Where would you use Flask, and where would you use Django?
Flask is lightweight and good for small projects, while Django is more robust and suitable for larger projects.
Flask is good for small projects with simple requirements
Django is more suitable for larger projects with complex requirements
Flask is lightweight and flexible, allowing for more customization
Django has a lot of built-in features and is more opinionated
Flask is better for RESTful APIs and microservices
Django is better for full-stack web applications
Examples of Flask ...read more

Asked in Hexagon Capability Center

Q. Q Reverse String Coding question Q find unique array value
Reverse a given string and find unique values in an array of strings.
Use the reverse() method to reverse the given string.
Use a Set to store unique values in the array.
Loop through the array and add each element to the Set.
Convert the Set back to an array to get the unique values.

Asked in Advantmed

Q. Keep SQL procedures short, use multiple small procedure with specific functionality being used, avoid use of temp tables and Joins, use select statements wisely. do not use sub queries, do not use dynamic sql
To optimize SQL procedures, keep them short, use small procedures with specific functionality, avoid temp tables and joins, use select statements wisely, avoid subqueries and dynamic SQL.
Break down complex procedures into smaller ones with specific functionality
Avoid using temporary tables and joins whenever possible
Use select statements wisely to retrieve only the necessary data
Avoid subqueries and find alternative approaches
Do not use dynamic SQL to prevent potential securi...read more

Asked in ServiceNow

Q. Given arrival and departure times of all trains that reach a railway station, find the minimum number of platforms required for the railway station so that no train waits.
Minimum 2 platforms required for a railway station.
At least 2 platforms are required for trains to arrive and depart simultaneously.
Additional platforms may be required based on the frequency of trains and passenger traffic.
Platforms should be long enough to accommodate the longest trains that will use the station.
Platforms should also have appropriate facilities for passengers, such as seating, shelter, and signage.

Asked in Advantmed

Q. Why use a button to submit a form when a link can also submit it?
Buttons are used for actions within the form, while links are used for navigation.
Buttons can trigger JavaScript functions or perform form validation before submission
Buttons can have different styles and behaviors compared to links
Buttons are more accessible for users with disabilities

Asked in Arcesium

Q. Given a list of strings, group them into distinct anagrams.
Group list of strings into distinct anagrams.
Create a hash table with sorted string as key and list of anagrams as value.
Iterate through the list of strings and add each string to its corresponding anagram list in the hash table.
Return the values of the hash table as a list of lists.

Asked in Ernst & Young

Q. For SSRS reports, why are temporary tables used instead of regular tables?
Temp tables are used in SSRS reports for performance optimization and to reduce resource consumption.
Temp tables are used to store intermediate results during report generation, reducing the need to repeatedly query the database.
Regular tables can lead to locking and contention issues in multi-user environments, while temp tables are session-specific and do not cause conflicts.
Temp tables can be indexed and optimized for specific report queries, improving overall performance....read more

Asked in DelaPlex Software

Q. How microservice communicate with each other, how sprint planning done, how you breakdown stories, java version and it's features, programs.
Microservices communicate via APIs, sprint planning involves breaking down stories, Java version features are utilized in programs.
Microservices communicate through APIs, allowing them to interact with each other independently.
Sprint planning involves breaking down user stories into smaller tasks to be completed within a sprint.
Java version features such as lambda expressions, streams, and modules are utilized in software development.
Examples: Using REST APIs for microservice...read more

Asked in ServiceNow

Q. Given an array of numbers, find the set of numbers that sums closest to a given target number.
Find set of numbers from an array that can form nearest sum to the given number.
Sort the array in ascending order
Use two pointers approach to find the nearest sum
Return the set of numbers

Asked in Tech Mahindra

Q. What do you do in case of bot execution failure?
In case of bot execution failure, I would identify the root cause and fix it as soon as possible.
Check the logs to identify the error message and the point of failure
Analyze the code to identify the root cause of the failure
Fix the issue and test the bot again to ensure it is working as expected
Implement measures to prevent similar failures in the future

Asked in Mphasis

Q. Using Stream API, add a 10% salary hike for employees with more than 5 years of experience.
Use Java Stream API to apply a 10% salary hike for employees with over 5 years of experience.
Use a List<Employee> to store employee data.
Filter employees with experience > 5 years using stream().filter().
Map the filtered employees to update their salary by multiplying with 1.1.
Collect the results back into a List using collect(Collectors.toList()).
Example: employees.stream().filter(e -> e.getExperience() > 5).map(e -> e.setSalary(e.getSalary() * 1.1)).collect(Collectors.toLis...read more

Asked in Zscaler Softech

Q. How do you create a singleton, ensuring reflection does not compromise the implementation?
To create a singleton ensuring reflection does not mess up the implementation, use an enum or a private constructor with a static field.
Use an enum to create a singleton as enums are inherently singletons and cannot be instantiated multiple times.
Alternatively, use a private constructor with a static field to create a singleton.
To prevent reflection from creating multiple instances, throw an exception in the constructor if an instance already exists.

Asked in Wissen Technology

Q. Write a JavaScript function to sanitize a string. For example, convert "HoW arE yOu" into "How are you".
This function converts a mixed-case string into a properly formatted lowercase string with the first letter capitalized.
Use the `toLowerCase()` method to convert the entire string to lowercase.
Split the string into words using the `split(' ')` method.
Capitalize the first letter of each word using `charAt(0).toUpperCase()`.
Join the words back together with a space using `join(' ')`.
Example: sanitizeString('HoW arE yOu') returns 'How Are You'.

Asked in Apisero

Q. Explain how data structures like dictionaries and hash maps work.
Dictionaries and hash maps are key-value data structures that provide fast data retrieval and storage using hashing techniques.
Dictionaries store data in key-value pairs, e.g., {'name': 'Alice', 'age': 30}.
Hash maps use a hash function to compute an index for storing values, ensuring O(1) average time complexity for lookups.
Collisions occur when multiple keys hash to the same index; they can be resolved using chaining or open addressing.
Python's built-in dictionary is impleme...read more

Asked in Advantmed

Q. How do you optimize a SQL procedure with 5000 lines of code?
Optimize a SQL procedure with 5000 lines of code by identifying bottlenecks and implementing performance improvements.
Identify and analyze the most time-consuming parts of the procedure
Optimize queries by adding appropriate indexes, rewriting queries, or using query hints
Break down the procedure into smaller, more manageable parts
Use temporary tables or table variables to reduce the amount of data processed at once
Consider using stored procedures or functions instead of inlin...read more

Asked in Mphasis

Q. How do you handle customized exceptions in controller advice with example code?
Handling customized exceptions in controller advice with example code
Create a custom exception class that extends RuntimeException
Create a controller advice class to handle exceptions globally
Use @ExceptionHandler annotation in the controller advice class to handle specific exceptions
Return a custom error response with appropriate status code and message

Asked in Nagarro

Q. 4. React: What is Virtual DOM, useState and different types of Hooks in React
Virtual DOM is a lightweight copy of the actual DOM, useState is a hook for managing state in functional components, and Hooks are functions that let you use state and other React features in functional components.
Virtual DOM is a lightweight copy of the actual DOM that React uses to improve performance by updating only the necessary parts of the actual DOM.
useState is a hook in React that allows functional components to have state. It returns an array with the current state ...read more

Asked in Morningstar

Q. How can we 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.
Interview Questions of Similar Designations
Interview Experiences of Popular Companies





Top Interview Questions for Senior Software Engineer Related Skills



Reviews
Interviews
Salaries
Users

