Capgemini
100+ Lead Mines Media Interview Questions and Answers
Q1. Pascal's Triangle Construction
You are provided with an integer 'N'. Your task is to generate a 2-D list representing Pascal’s triangle up to the 'N'th row.
Pascal's triangle is a triangular array where each el...read more
Q2. Trailing Zeros in Factorial Problem
Find the number of trailing zeroes in the factorial of a given number N
.
Input:
The first line contains an integer T
representing the number of test cases.
Each of the followi...read more
Q3. Kth Largest Number Problem Statement
You are given a continuous stream of numbers, and the task is to determine the kth largest number at any moment during the stream.
Explanation:
A specialized data structure ...read more
Q4. Count Inversions Problem Statement
Given an integer array ARR
of size N
, your task is to find the total number of inversions that exist in the array.
An inversion is defined for a pair of integers in the array ...read more
Q5. 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
Q6. 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
Q7. Find Duplicates in an Array
You are given an array/list ARR
consisting of N integers, where each element is in the range 0 to N - 1. Your task is to identify all duplicate elements present in ARR
.
Input:
The fi...read more
Q8. 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
Q9. 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
Q17. Difference between procedure and function, delete and truncate, exit and in, cursor and bulk bind, cursor and collection, view and materialized view. How to avoid cross join. Different types of joins.
Explanation of differences between programming concepts and techniques.
Procedure vs Function: Functions return a value while procedures do not.
Delete vs Truncate: Delete removes rows one by one while truncate removes all rows at once.
Exit vs In: Exit is used to exit a loop or a program while In is used to pass values into a subprogram.
Cursor vs Bulk Bind: Cursor fetches one row at a time while Bulk Bind fetches multiple rows at once.
Cursor vs Collection: Cursor is used to fet...read more
Q18. What is OOP? Can main method be overloaded? What is a abstraction with example? How to take properties from base class to child class using inheritance? Why Java is not purely object oriented? What is this keyw...
read moreOOP stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects, which can contain data and code.
Main method can be overloaded in Java by defining multiple methods with the same name but different parameters.
Abstraction in OOP is the concept of hiding the implementation details and showing only the necessary features of an object. Example: Car as an object with properties like color, model, and methods like start, stop.
Inheritance in J...read more
Q35. Difference between array and stack What is linked list and explain its types Advantages of each type of linked list over other Pseudo code of bubble sort algorithm Concept of deque - insertion and deletion
Array is a fixed-size collection of elements, while stack is a data structure that follows Last In First Out (LIFO) principle.
Array is a static data structure, while stack is a dynamic data structure.
In array, elements are accessed using index, while in stack, elements are accessed using push and pop operations.
Linked list is a data structure where each element points to the next element, types include singly linked list, doubly linked list, and circular linked list.
Advantage...read more
Q42. What is meant by inheritance How good are you about Spring boot and advantages of Spring boot. Spring annotations list them. List different design patterns Explain singleton design pattern Explain about collect...
read moreQuestions related to Java programming language and Spring framework
Inheritance is a mechanism in Java where a class acquires the properties of another class
Spring Boot is a popular framework for building web applications in Java
Advantages of Spring Boot include easy configuration, auto-configuration, and embedded servers
Spring annotations are used to provide metadata to the Spring framework
Some common Spring annotations include @Autowired, @Controller, and @Service
Design patt...read more
Q44. Can you provide a program that prints the second largest number in both an array and a list, illustrating implementations using streams as well as traditional methods?
Program to find second largest number in an array and list using streams and traditional methods.
Use streams to find second largest number in array: Arrays.stream(array).distinct().sorted().skip(array.length - 2).findFirst().orElse(null)
Use traditional method to find second largest number in list: Sort the list in descending order and get the element at index 1
Ensure to handle edge cases like empty array/list or arrays/lists with less than 2 elements
Q45. 1. How to improve the performance of a spring application 2. How to connect to 2 databases from spring application 3. How to develop a REST API in springboot
Improving performance, connecting to multiple databases, and developing REST API in a Spring application.
To improve performance, use caching mechanisms like Spring Cache or Redis.
To connect to 2 databases, configure multiple DataSource beans in the application context.
To develop a REST API in Spring Boot, use @RestController annotation and define request mappings.
Q55. What are the new changes in UiPath and what do you like about it?
UiPath has introduced new features like AI Fabric, Document Understanding, and improved automation capabilities.
Introduction of AI Fabric for integrating AI models into automation workflows
Enhanced Document Understanding capabilities for processing unstructured data
Improved automation capabilities with features like Task Capture and Task Mining
Q56. How to remove duplicate rows in a table without using distinct?
Use a self join to remove duplicate rows in a table without using distinct.
Join the table with itself on the columns that define duplicates
Filter out rows where the primary key is the same but other columns are different
Select only distinct rows based on the primary key
Q57. Can we create more than a foreign key in single table?
Yes, it is possible to create multiple foreign keys in a single table.
Multiple foreign keys can be created in a single table by referencing different columns in the same or different tables.
Each foreign key constraint must be defined separately with appropriate references.
Foreign keys help maintain referential integrity between tables in a database.
Example: Creating foreign keys in a 'Orders' table to reference 'Customers' and 'Products' tables.
Q59. What is the design of the microservices implemented in your current project?
The microservices in our current project are designed using a combination of RESTful APIs and event-driven architecture.
Microservices are designed to be loosely coupled and independently deployable.
Each microservice focuses on a specific business domain or functionality.
Communication between microservices is done through RESTful APIs and message queues.
We use event-driven architecture for handling asynchronous communication and data flow.
Each microservice is responsible for i...read more
Q60. What is the difference between a List and a Dictionary in programming?
List is an ordered collection of elements, while a Dictionary is a collection of key-value pairs.
List maintains elements in a specific order, while Dictionary stores key-value pairs where keys are unique.
Accessing elements in a List is done by index, while accessing values in a Dictionary is done by key.
Example: List - [1, 2, 3], Dictionary - {'a': 1, 'b': 2, 'c': 3}
Q62. What would you do if the requirements keeps on changing during the course of the sprint
I would communicate with the stakeholders to understand the reasons for the changes and prioritize them accordingly.
Communicate with stakeholders to understand the reasons for the changes
Prioritize the changes based on impact and urgency
Adjust the sprint plan and tasks accordingly
Ensure clear documentation and communication with the team
Q63. What is OOP's and Explain OOP's features?
OOP stands for Object-Oriented Programming. It is a programming paradigm that uses objects to represent and manipulate data.
OOP focuses on creating reusable code through the use of classes and objects.
It emphasizes encapsulation, inheritance, and polymorphism.
Encapsulation refers to the practice of hiding the internal workings of an object from the outside world.
Inheritance allows classes to inherit properties and methods from other classes.
Polymorphism allows objects to take...read more
Q64. What is collection in java and Arrays explain?
Collection is a framework in Java that provides an architecture to store and manipulate a group of objects.
Arrays are a fixed-size collection of elements of the same data type.
Collections are dynamic and can grow or shrink in size.
Arrays use square brackets to declare and initialize, while collections use classes like ArrayList or LinkedList.
Collections provide many useful methods like add(), remove(), and size().
Q66. Which is best for delete the records entity base or native query
It depends on the specific requirements and constraints of the application.
Use entity base delete for simple operations where ORM can handle cascading deletes and relationships.
Use native query for complex operations or when performance is a concern.
Consider the impact on database integrity and consistency when choosing between entity base and native query.
Q67. What is the difference between roll-up and scan component?
Roll-up and scan components are both used in data processing, but they have different functions and purposes.
Roll-up is a data aggregation technique that summarizes data at a higher level of granularity.
Scan component, on the other hand, is used to read and process data sequentially.
Roll-up is commonly used in data warehousing to generate summary reports or perform calculations on aggregated data.
Scan component is often used in data processing pipelines to iterate through lar...read more
Q68. What is different between string and StrinbBuffer ?
String is immutable while StringBuffer is mutable.
StringBuffer can be modified while String cannot.
StringBuffer is thread-safe while String is not.
StringBuffer has append() method while String does not.
StringBuffer is slower than String for simple operations.
Q70. What is differenet among final, finaly & finalize keyword
final is a keyword used to declare a constant variable, finally is a block used in try-catch-finally, and finalize is a method used for garbage collection.
final is used to declare a constant variable that cannot be changed
finally is a block used in try-catch-finally to execute code regardless of whether an exception is thrown or not
finalize is a method used for garbage collection to perform any necessary cleanup actions before an object is destroyed
All three keywords are unre...read more
Q71. Algo for odd - even program without using modulus operator.
Use bitwise AND operation to determine if a number is odd or even.
Use bitwise AND operation with 1 to check if the least significant bit is 1 or 0.
If the result is 1, the number is odd. If the result is 0, the number is even.
Example: num & 1 will return 1 for odd numbers and 0 for even numbers.
Q72. How many transitions are there in RE Framework?
There are 4 transitions in RE Framework: Init, Get Transaction Data, Process Transaction, and End Process.
Init - Initializes the application, opens applications, logs in, and sets up environment.
Get Transaction Data - Retrieves transaction data from queue or data source.
Process Transaction - Processes the transaction data, performs necessary actions, and updates status.
End Process - Cleans up resources, logs out, and closes applications.
Q73. What are the Hooks life cycle in the angular?
Hooks are functions that allow you to tap into the lifecycle of a component in Angular.
Hooks are used to perform actions at specific points in the component's lifecycle.
There are several types of hooks, including ngOnInit, ngOnChanges, and ngOnDestroy.
ngOnInit is called once when the component is initialized.
ngOnChanges is called when the component's input properties change.
ngOnDestroy is called just before the component is destroyed.
Q74. Difference between abstract and normal function
Abstract functions cannot be instantiated and must be implemented by child classes, while normal functions can be directly called.
Abstract functions have no implementation in the parent class, while normal functions do.
Abstract functions are declared with the 'abstract' keyword, while normal functions are not.
Normal functions can be called directly, while abstract functions must be implemented by child classes.
An example of an abstract function is 'draw' in a 'Shape' class, w...read more
Q75. Concurrent HashMap vs HashMap. When to use which one.
ConcurrentHashMap is thread-safe and allows concurrent access, while HashMap is not thread-safe and can lead to race conditions.
Use ConcurrentHashMap when multiple threads need to access and modify the map concurrently.
Use HashMap when only a single thread will be accessing or modifying the map.
ConcurrentHashMap is more suitable for high-concurrency scenarios like multi-threaded applications.
HashMap is faster for single-threaded operations due to lack of synchronization overh...read more
Q76. Create forms in Drupal with explanation with all line of code
Creating forms in Drupal with code explanation
Use the Drupal Form API to create forms
Define form elements using the Form API functions
Implement form validation and submission handlers
Use hook_form_alter to modify existing forms
Q77. How will you deal with difficult customer
I will listen to their concerns, empathize with their situation, and work towards finding a solution that meets their needs.
Listen actively to understand their concerns
Empathize with their situation to show understanding and build rapport
Work collaboratively to find a solution that meets their needs
Maintain professionalism and patience throughout the interaction
Q78. How do you provide security for restful webservices
Security for RESTful webservices is provided through authentication, authorization, encryption, and input validation.
Implement authentication mechanisms such as OAuth, JWT, or API keys to verify the identity of clients accessing the services.
Use authorization techniques like role-based access control (RBAC) or attribute-based access control (ABAC) to control what actions users can perform.
Encrypt sensitive data using SSL/TLS to ensure secure communication between clients and ...read more
Q79. from an array you have find the 2nd largest number using java 8
Use Java 8 stream to find the 2nd largest number in an array of strings.
Convert the array of strings to an array of integers using stream and map function.
Sort the array in descending order using sorted() method.
Skip the first element to get the second largest number using skip() method.
Q80. diff between abstract class and interfaces
Abstract classes can have implementation while interfaces cannot.
Abstract classes can have constructors while interfaces cannot.
A class can implement multiple interfaces but can only inherit from one abstract class.
Abstract classes can have non-abstract methods while interfaces can only have abstract methods.
Interfaces are used for full abstraction while abstract classes are used for partial abstraction.
Example of abstract class: public abstract class Animal { public void eat...read more
Q81. Give me example for list comprehension and regression
List comprehension is a concise way to create lists in Python. Regression is a statistical method to model relationships between variables.
List comprehension example: squares = [x**2 for x in range(10)]
Regression example: fitting a linear regression model to predict house prices based on square footage
Q82. Tell about Data Structures in C++
Data structures in C++ are used to organize and store data efficiently.
C++ provides various built-in data structures like arrays, linked lists, stacks, queues, trees, and graphs.
These data structures can be used to store and manipulate data in an efficient manner.
C++ also allows for the creation of user-defined data structures using classes and structures.
The choice of data structure depends on the type of data and the operations that need to be performed on it.
Q83. What is the difference btw c and c++?
C is a procedural programming language while C++ is an object-oriented programming language.
C is a procedural programming language, while C++ is a multi-paradigm language that supports procedural, object-oriented, and generic programming.
C does not support classes and objects, while C++ does.
C does not have built-in support for exception handling, while C++ does with try-catch blocks.
C does not have namespaces, while C++ does to avoid naming conflicts.
C does not have function...read more
Q84. What is SDLC in software engineering
SDLC stands for Software Development Life Cycle, a process used by software engineers to design, develop, and test software applications.
SDLC is a structured process that consists of several phases including planning, analysis, design, implementation, testing, and maintenance.
Each phase of SDLC has its own set of activities and deliverables to ensure the successful completion of the software project.
Examples of SDLC models include Waterfall, Agile, and DevOps, each with its o...read more
Q85. How to make class as Immutable?
To make a class immutable, its state should not be modifiable after creation.
Make all fields private and final
Do not provide any setters
If mutable objects are used, return copies instead of references
Ensure that the class cannot be extended
Consider making the constructor private and providing a factory method
Q86. What are the decorators in python
Decorators in Python are functions that modify the behavior of other functions or methods.
Decorators are denoted by the @ symbol followed by the decorator function name.
They are commonly used for adding functionality to existing functions without modifying their code.
Decorators can be used for logging, authentication, caching, and more.
Example: @staticmethod decorator in Python is used to define a method that is not bound to a class instance.
Q87. What is abstract function
An abstract function is a function that has no implementation and must be implemented by its subclasses.
An abstract function is declared with the 'abstract' keyword.
It is used to define a template for its subclasses to follow.
It cannot be instantiated and must be implemented by its subclasses.
It can have abstract and non-abstract methods.
Example: abstract class Animal { abstract void makeSound(); }
Example: class Dog extends Animal { void makeSound() { System.out.println('Bark...read more
Q88. what are the oops concept in java.
Object-oriented programming concepts in Java include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Polymorphism allows objects to be treated as instances of their parent class.
Abstraction hides the implementation details and only shows the necessary features of an object.
Q89. Explain the impediments that you resolved
Resolved impediments related to outdated technology, lack of communication, and unclear requirements
Upgraded legacy systems to modern technology to improve performance and security
Implemented regular team meetings to enhance communication and collaboration
Worked closely with stakeholders to clarify project requirements and ensure alignment
Q90. Write a program to print characters in the string?
Program to print characters in a string
Use a loop to iterate through each character in the string
Print each character as you iterate through the string
Q91. Explain concepts of Docker and Kubernetes
Docker is a platform for developing, shipping, and running applications in containers. Kubernetes is a container orchestration tool for managing containerized applications across a cluster of nodes.
Docker allows developers to package applications and dependencies into containers for easy deployment.
Kubernetes automates the deployment, scaling, and management of containerized applications.
Docker containers are lightweight, portable, and isolated environments that can run on an...read more
Q92. Talk for 3 min in any topic of your interest
Discussing the impact of artificial intelligence on society
Introduction to artificial intelligence and its applications
Benefits of AI in various industries such as healthcare, finance, and transportation
Ethical considerations and concerns surrounding AI technology
Future implications of AI on the job market and economy
Q93. What are your preffered location?
I prefer locations with a good work-life balance, access to outdoor activities, and a vibrant tech community.
Good work-life balance is important to me
Access to outdoor activities like hiking and biking
Vibrant tech community for networking and growth opportunities
Q94. Difference between Union and Union All in Sql
Union combines and removes duplicates, Union All combines without removing duplicates.
Union merges the result sets of two or more SELECT statements and removes duplicates
Union All merges the result sets of two or more SELECT statements without removing duplicates
Union is slower than Union All as it involves removing duplicates
Example: SELECT column1 FROM table1 UNION SELECT column1 FROM table2;
Example: SELECT column1 FROM table1 UNION ALL SELECT column1 FROM table2;
Q95. Difference between list and tuple in python
List is mutable, tuple is immutable in Python.
List can be modified after creation, tuple cannot.
List uses square brackets [], tuple uses parentheses ().
List is used for collections of items that may change, tuple for fixed collections.
Example: list_example = [1, 2, 3], tuple_example = (4, 5, 6)
Q96. What do you know about Capg?
Capgemini is a global leader in consulting, technology services and digital transformation.
Capgemini is a multinational corporation headquartered in France.
It provides consulting, technology services, and digital transformation.
Capgemini operates in over 40 countries and has around 200,000 employees worldwide.
Q97. What is Enhanced RE Framework?
Enhanced RE Framework is a robust automation framework in UiPath that provides reusable components and efficient error handling.
Enhanced RE Framework is an advanced version of the Robotic Enterprise Framework (REFramework) in UiPath.
It includes additional features such as enhanced error handling, logging, and reusability of components.
The framework follows best practices for automation development and helps in building scalable and maintainable automation solutions.
It consist...read more
Q98. What is functional interface?
Functional interface is an interface with only one abstract method.
Functional interface can have any number of default or static methods.
It is used in lambda expressions and method references.
Examples of functional interfaces are Runnable, Comparator, and Predicate.
Q99. what is different security majors
Different security majors focus on various aspects of cybersecurity such as network security, application security, and cloud security.
Network Security: Focuses on securing networks and preventing unauthorized access.
Application Security: Involves securing software applications from threats and vulnerabilities.
Cloud Security: Concentrates on protecting data stored in cloud environments.
Information Security: Encompasses all aspects of securing information and data.
Cybersecurit...read more
Q100. Goroutines - explain with example code
Goroutines are lightweight threads managed by Go runtime, allowing concurrent execution of functions.
Goroutines are created using the 'go' keyword followed by a function call.
They are multiplexed onto multiple OS threads by the Go runtime.
Example: go func() { fmt.Println('Hello, goroutine!') }
Goroutines are used for concurrent programming in Go, enabling parallelism.
More about working at Capgemini
Top HR Questions asked in Lead Mines Media
Interview Process at Lead Mines Media
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month