Capgemini
100+ Interview Questions and Answers
You are given an integer N. Your task is to return a 2-D ArrayList containing the pascal’s triangle till the row N.
A Pascal's triangle is a triangular array constructed by summing adjacent ele...read more
You are given an integer N, you need to find the number of trailing zeroes in N! (N factorial).
Note:
1. Trailing zeros in a number can be defined as the number of continuous suffix z...read more
You will be given a stream of numbers, and you need to find the kth largest number in the stream at any given time.
As the stream of numbers can not be given during compile time, so you need t...read more
For a given integer array/list 'ARR' of size 'N', find the total number of 'Inversions' that may exist.
An inversion is defined for a pair of integers in the array/list when the following two co...read more
For a given array/list of integers of size N, print the Next Greater Element(NGE) for every element. The Next Greater Element for an element X is the first element on the right side of X in ...read more
Ninja loves playing with numbers. One day Alice gives him some numbers and asks him to find the Kth largest value among them.
Input Format:
The first line of input contains an integer ‘T,’ de...read more
You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find ...read more
Ayush is given a number ‘X’. He has been told that he has to find the first ‘X’ terms of the series 3 * ‘N’ + 2, which are not multiples of 4. Help Ayush to find it as he has not been able to answer....read more
You are 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 Target.
Note:
We cannot use the element at a given inde...read more
What is meant by Interface?
1) Explain indexing in a database.
2) Explain the difference between primary and secondary index.
3) Difference between static and dynamic MLI.
4) Advantages of B tree index vs B+ tree inde...read more
What is the starter dependency of the Spring boot module?
What is Garbage collector in JAVA?
1) Explain the difference between process, program and a thread.
2) Explain virtualisation.
3) Do we use virtualisation in everyday computers, if so how?
4) What are some commonly used page scheduling ...read more
What does the @SpringBootApplication annotation do internally?
What is the difference between Cluster and Non-Cluster Index?
Table my_numbers contains many numbers in column num including duplicated ones. Can you write a SQL query to find the biggest number, which only appears once.
1) Given an employee table retrieve eids from the table who have signed in after 10.30 consecutively for 5 days.
2) How to take backup of table in MYSQL?
3) Explain ACID properties in DBMS.
4) What i...read more
How would you differentiate between a String, StringBuffer, and a StringBuilder?
What happens if the static modifier is not included in the main method signature in Java?
1) What is thrashing and what are its causes?
2) Recovery of thrashing?
3) What is contiguous space allocation method?
4) Explain external fragmentation.
5) Difference between serial and ...read more
Why Java is platform independent and JVM platform dependent?
1) What is JSX?
2) What are higher order components?
3) Explain prop drilling.
4) Do you know anything about the producer consumer problem?
5) What is circular wait ?
Explain the difference between driver.close() and driver.quit() command in Selenium?
Q25. 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
What is a classloader ?
Why are java strings immutable in nature?
What is the default value of local variables in Java?
Q27. 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
What are the different types of waits available in WebDriver?
What do chmod, chown, chgrp commands do?
What are the four parameter you have to pass in Selenium?
1) Why Capgemini?
2) Are you comfortable in relocating?
3) Are you planning for higher studies?
Difference between the DELETE and TRUNCATE command in a DBMS.
What is meant by normalization and denormalization?
How to Take a Backup of a Table in MySQL?
What are the advantages of Packages in Java?
What is the difference between assert and verify commands?
Why is normalization needed in a database?
What distinguishes a structure from a class in C++?
Difference between Abstract class and Interface.
Why are Java Strings immutable in nature?
What is Latency in API testing?
What are Junit annotations?
What are the limitations of Selenium?
Can we override or replace the Embedded tomcat server in Spring Boot?
How to enable Actuator in Spring boot application?
Q46. 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
What is Spring Boot starter? How is it useful?
1) Why capgemini?
2) Comfortable to relocate?
3) Are you planning for higher studies?
What is dependency Injection?
What is Self-Join and Cross-Join ?
For a given employee dataset, find the employee who works in loan department, earns the second lowest salary and directly reports to a manager.
What is the difference between new() and malloc()?
When should I use Selenium Grid?
What is Memory Protection in OS ?
Explain the Life Cycle of a Thread in Java .
1) Explain normalisation.
2) Difference between foreign and candidate key.
3) Difference between BCNF and 3NF.
4) Memory Protection in OS
5) Explain pipelining.
Q57. 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
Q59. 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.
What is the difference between JDK, JRE, and JVM?
Explain SOLID principles in Object Oriented Design .
Explain the pause feature in Selenium IDE.
Explain the difference between findElement() and findElements() in Selenium.
Explain the concept of ACID properties in DBMS.
What is an interface?
Q68. 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
What is classloader?
Explain the various navigation commands supported by Selenium.
Q71. 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
Q72. 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.
Explain the difference between intension and extension in a database.
Explain any 5 essential UNIX commands .
Q75. 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
Q76. 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
Q77. 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().
Tell us something about JIT compiler.
Q79. 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.
Q80. 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
Q81. 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.
Explain Piping in Unix/Linux
Q83. 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
Q84. 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.
Q85. 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.
Q86. 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.
Q87. 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
Q88. 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
Q89. 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
Q90. 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
Q91. 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
Q92. 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.
Q93. 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
Q94. 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.
Q95. 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
Q96. 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
Q97. 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
Q98. 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
Q99. 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.
Q100. 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
More about working at Capgemini
Top HR Questions asked in null
Interview Process at null
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month