Senior Software Engineer
3500+ Senior Software Engineer Interview Questions and Answers
Q51. What is difference between Abstract and Interface, give me some example of your project in which you have used Abstract class and Interface.
Abstract class and Interface are both used for abstraction, but with some differences.
Abstract class can have both abstract and non-abstract methods, while Interface can only have abstract methods.
A class can implement multiple interfaces, but can only inherit from one abstract class.
Abstract class can have instance variables, while Interface cannot.
Abstract class provides partial implementation, while Interface provides full abstraction.
Example of using Abstract class: Creat...read more
Q52. Kth Largest Element Problem Statement
Ninja enjoys working with numbers, and Alice challenges him to find the Kth largest value from a given list of numbers.
Input:
The first line contains an integer 'T', repre...read more
Q53. Next Greater Element Problem Statement
Given a list of integers of size N
, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X
is the first elem...read more
Q54. Find Terms of Series Problem
Ayush is tasked with determining the first 'X' terms of the series defined by 3 * N + 2, ensuring that no term is a multiple of 4.
Input:
The first line contains a single integer 'T...read more
Q55. How have you implemented dependency injection in your .NET Core projects? How have you used the Razor engine to build dynamic views in your ASP.NET Core projects? Can you explain how you have used Angular to bu...
read moreAnswering questions on .NET Core, Razor engine, and Angular
Implemented dependency injection in .NET Core using built-in DI container or third-party libraries like Autofac or Ninject
Used Razor engine to build dynamic views by creating Razor views with HTML and C# code to generate dynamic content
Built single-page applications using Angular by creating components, services, and modules to manage data and UI
Q56. Find All Pairs Adding Up to Target
Given an array of integers ARR
of length N
and an integer Target
, your task is to return all pairs of elements such that they add up to the Target
.
Input:
The first line conta...read more
Share interview questions and help millions of jobseekers 🌟
Q57. 1) What is volatile? 2) What is constant? 3) Can we use volatile and const at a time?4) What is ISR how it works?
Answers to questions related to software engineering concepts.
Volatile is a keyword used to indicate that a variable's value can be changed unexpectedly.
Constant is a keyword used to indicate that a variable's value cannot be changed once it is assigned.
Volatile and const can be used together to indicate that a variable's value cannot be changed and that it may change unexpectedly.
ISR stands for Interrupt Service Routine and is a function that is called when an interrupt occu...read more
Q58. What is difference between Microflow and Nanoflow in Mendix?
Microflows and nanoflows are both used in Mendix for defining business logic, but they differ in their scope and complexity.
Microflows are used for larger and more complex processes, while nanoflows are used for smaller and simpler processes.
Microflows can have multiple activities and can be triggered by events, while nanoflows have a single activity and are typically called from microflows.
Microflows can have input and output parameters, while nanoflows do not support parame...read more
Senior Software Engineer Jobs
Q59. 1. High Level System Design -> Design Uber like Service. Follow up -> What would be your tech stack for designing such a service to make sure it could scale when needed.
Tech stack for designing a scalable Uber-like service.
Use microservices architecture for scalability and fault tolerance.
Choose a cloud provider with auto-scaling capabilities.
Use a load balancer to distribute traffic across multiple instances.
Use a NoSQL database for high availability and scalability.
Use message queues for asynchronous communication between services.
Use containerization for easy deployment and management.
Use caching to improve performance.
Use monitoring and ...read more
Q60. Solved it by looping through each element first. Split the string into an array to get access to each character. Using the .every() method checks whether each character of the string is present inside the user...
read moreThe question asks about using .every() and .includes() methods to check if each character of a string is present in another string.
Loop through each element of the string
Split the string into an array to access each character
Use .every() method to check if each character is present in the user string
Use .includes() method to check if the character is present
Q64. Write a Program identify Max length of a substring from a given string and also the substring should be palindrome
Program to find the longest palindrome substring in a given string.
Iterate through the string and check for palindromes of different lengths
Store the longest palindrome found
Return the length and substring
Q65. How have you handled security in your Angular and .NET Core applications, such as implementing JWT or OAuth authentication?
Implemented JWT and OAuth authentication in Angular and .NET Core apps.
Used Angular's HttpInterceptor to add JWT token to requests
Implemented OAuth2 authentication using IdentityServer4 in .NET Core
Stored user credentials securely using ASP.NET Core Identity
Used HTTPS to encrypt data in transit
Implemented role-based authorization using ASP.NET Core Identity
Q66. What are custom hooks in React, and what are their use cases? Additionally, can you provide an example of a custom hook that performs an API call and utilizes the retrieved data?
Custom hooks in React are reusable functions that allow you to extract component logic into separate functions for better code organization and reusability.
Custom hooks are created using the 'use' prefix and can be used to share logic between components.
Use cases for custom hooks include fetching data from an API, handling form state, managing local storage, and more.
Example of a custom hook for API call: const useFetchData = (url) => { // logic to fetch data from API }
Q68. What is nodejs and difference between nodejs and javascript
Node.js is a server-side JavaScript runtime environment.
Node.js is built on top of the V8 JavaScript engine from Google Chrome.
It allows developers to write server-side code in JavaScript.
Node.js has a non-blocking I/O model, making it efficient for handling large amounts of data.
Node.js has a vast library of modules available through npm (Node Package Manager).
Q69. 1)Val a = Array(1,2,1,3,4) Need output as (1,2) (2,1) (1,3) (3,4)
Print pairs of adjacent elements in an array
Loop through the array and print each pair of adjacent elements
Use a for loop and access the elements using their indices
Example: for i in 0 until a.length-1 print (a[i], a[i+1])
Q70. What do you mean by Integration, middleware, EAI systems
Integration, middleware, and EAI systems are technologies that enable communication and data exchange between different software applications.
Integration involves connecting different software applications to enable data exchange and communication.
Middleware is software that sits between different applications and facilitates communication and data exchange.
EAI (Enterprise Application Integration) systems are a type of middleware that enable communication between different en...read more
Q71. What is the difference between a hard link and a symbolic link in Unix? How do you find out the system's IP address in Unix? What is the function of the chmod command in Unix? Explain the difference between gre...
read moreUnix related questions for Senior Software Engineer interview
A hard link is a direct link to the physical file on disk, while a symbolic link is a reference to the file by name.
To find out the system's IP address in Unix, you can use commands like ifconfig or ip addr show.
The chmod command in Unix is used to change the permissions of a file or directory.
grep is used for searching text using regular expressions, while egrep is an extended version of grep with more powerful pat...read more
Q72. What is the biggest challenge you faced in developing azure solution?
The biggest challenge in developing Azure solution was managing the complexity of the cloud environment.
Managing the complexity of the cloud environment
Ensuring scalability and reliability
Integrating with existing systems
Securing the solution
Optimizing cost
Example: Migrating a legacy application to Azure
Q75. What if, i need to make some changes into the POCO class to extend the entity to add some extra properties?
Modifying the POCO class allows extending the entity with additional properties.
To add extra properties, simply modify the POCO class by adding new properties.
Ensure that the changes are reflected in the database schema if necessary.
Update any existing code that interacts with the POCO class to handle the new properties.
Consider the impact on serialization, validation, and any other relevant aspects.
Q77. If I have assigned different colors to an ID and a class and applied both to the same element, which color will be applied based on CSS specificity precedence?
The color applied will be based on the specificity of the selector, with ID having higher specificity than class.
ID has higher specificity than class in CSS
Color applied will be based on the selector with higher specificity
Example: If ID selector has color red and class selector has color blue, the color applied will be red
Q78. What will be the output of the following JavaScript code fragment: `const a; function test() { console.log(a); }; test();`?
The code will throw an error because 'a' is declared but not initialized.
The code will result in a ReferenceError because 'a' is declared but not assigned a value.
Variables declared with 'const' must be initialized at the time of declaration.
Initializing 'a' with a value before calling test() will prevent the error.
Q79. How many types of variables there in Java?
There are three types of variables in Java: local, instance, and static.
Local variables are declared within a method or block and have limited scope.
Instance variables are declared within a class but outside of any method and are accessible to all methods of the class.
Static variables are declared with the static keyword and are shared among all instances of the class.
Examples: int x; //instance variable, static int y; //static variable, void method() { int z; //local variabl...read more
Q80. Is parallel stream always beneficial in java stream API? Java Singleton vs Spring Singleton write a program to find the nth largest number in an array of integers. Spring bean scopes. how will you handle a larg...
read moreParallel stream is not always beneficial in Java Stream API.
Parallel stream can be slower than sequential stream for small data sets or when the overhead of parallelism is greater than the benefit.
Parallel stream can be beneficial for large data sets or when the operations are independent and can be executed in parallel.
It is important to measure the performance of both sequential and parallel streams for a specific use case to determine which is more efficient.
Q81. Write a program to find last non repeating character in a given string using Java 8 functions only like Streams and Lambda's.
Program to find last non-repeating character in a given string using Java 8 functions only.
Use Java 8 Streams and Lambda's to filter the string and find the last non-repeating character.
Create a Map to store the frequency of each character in the string.
Use the filter() method to get the non-repeating characters and find the last one using reduce().
Q84. What is your comfort level on HTML, CSS and JavaScript
I am highly proficient in HTML, CSS, and JavaScript.
Extensive experience in building responsive web applications using HTML, CSS, and JavaScript
Strong understanding of front-end frameworks like React, Angular, or Vue.js
Familiarity with CSS preprocessors like SASS or LESS
Knowledge of modern JavaScript ES6+ features and best practices
Experience in optimizing web performance and cross-browser compatibility
Q85. 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
Q86. What are delegates and why we need it. Which are built in delegates in c#
Delegates are reference types that hold a reference to a method. They are used to achieve loose coupling and event handling.
Delegates allow methods to be passed as parameters to other methods.
They can be used to define callback methods.
Built-in delegates in C# include Action, Func, Predicate, EventHandler, and Comparison.
Action and Func are used for methods that return void and non-void values respectively.
Predicate is used for methods that return a Boolean value.
EventHandler...read more
Q87. What is Difference between let var const,
let, var, and const are all used to declare variables in JavaScript, but they have different scoping rules and behaviors.
let and const were introduced in ES6, while var has been around since the beginning of JavaScript.
let and const are block-scoped, while var is function-scoped.
Variables declared with const cannot be reassigned, while let and var can be.
const variables must be initialized when they are declared, while let and var can be declared without initialization.
Exampl...read more
Q88. What is the difference between List and Tuple?
List is mutable and Tuple is immutable in Python.
List can be modified after creation while Tuple cannot be modified.
List uses square brackets [] while Tuple uses parentheses ().
List is used for homogenous data while Tuple is used for heterogenous data.
List is slower than Tuple in terms of performance.
Example of List: [1, 2, 3] and Example of Tuple: (1, 'hello', 3.14)
The program prints a star pattern using asterisks and spaces.
Use nested loops to iterate through rows and columns.
Determine the number of asterisks and spaces to print in each row.
Use conditional statements to decide when to print an asterisk or a space.
Q90. 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 an...
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
Q91. How to switch between Tabs in a browser using selenium
To switch between tabs in a browser using Selenium, we can use the getWindowHandles() method and switchTo() method.
Use getWindowHandles() method to get the handles of all open tabs
Store the handles in a Set
Use switchTo() method to switch to a specific tab by passing the handle as an argument
Q94. How do you find the code performance issue in the code deployed in production?
To find code performance issues in production, use monitoring tools and profiling techniques.
Use monitoring tools like New Relic, AppDynamics, or Datadog to track performance metrics and identify bottlenecks.
Use profiling techniques like CPU profiling, memory profiling, and network profiling to pinpoint specific areas of the code that are causing performance issues.
Analyze logs and error messages to identify patterns and potential performance issues.
Perform load testing and s...read more
Q95. Can you write a program to show the percentage of completion while file is uploading to server?
Yes
Use AJAX or WebSocket to send file data to the server
Track the progress of the file upload using the 'progress' event
Calculate the percentage of completion based on the total file size and the amount uploaded
Q96. (HLD) -> Design a service which combines multiple sources of data/documentation and aggregates it such that all info is available centrally.
Design a service to aggregate multiple sources of data/documentation centrally.
Identify sources of data/documentation
Determine data aggregation method
Design a centralized database to store aggregated data
Develop a user-friendly interface to access the data
Ensure data security and privacy
The start() method is used to start a new thread and execute the run() method.
The start() method creates a new thread and calls the run() method.
The run() method contains the code that will be executed in the new thread.
Calling the run() method directly will not create a new thread.
The start() method should be called to start the execution of the new thread.
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