i
Capgemini
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I was interviewed in Jun 2024.
Use dropDuplicates() function in pyspark to remove duplicates in a data frame.
Use dropDuplicates() function on the data frame to remove duplicates based on all columns.
Specify subset of columns to remove duplicates based on specific columns.
Use the distinct() function to remove duplicates and keep only distinct rows.
Broadcast join is a type of join operation in distributed computing where one smaller dataset is broadcasted to all nodes for efficient processing.
Reduces data shuffling by sending smaller dataset to all nodes
Useful when one dataset is significantly smaller than the other
Improves performance by reducing network traffic and processing time
Re-Partition and Coalesce are methods used to control the number of partitions in a dataset in Apache Spark.
Re-Partition is used to increase or decrease the number of partitions in a dataset by shuffling the data across the cluster.
Coalesce is used to decrease the number of partitions in a dataset without shuffling the data, which can improve performance.
Re-Partition is typically used when there is a need to increase p...
Extract Pincode from Address Field in Dataframe using Pyspark
Use pyspark.sql.functions regexp_extract() function to extract pincode from address field
Create a new column in the dataframe to store the extracted pincode
Specify the regular expression pattern for pincode extraction
Example: df.withColumn('pincode', regexp_extract(df['address'], '\b\d{6}\b', 0))
SQL query to retrieve student names with marks > 45 in each subject
Use GROUP BY and HAVING clauses to filter students with marks > 45 in each subject
Join Student table with Marks table on student_id to get marks for each student
Select student names from Student table based on the conditions
Enable Hive support in Spark for seamless integration of Hive tables and queries.
Set 'spark.sql.catalogImplementation' to 'hive' in SparkConf
Include 'spark-hive' dependency in the Spark application
Ensure Hive configuration files are available in the classpath
Use HiveContext or enable Hive support in SparkSession
Joins in Spark using PySpark are used to combine data from two different DataFrames based on a common key.
Joins are performed using the join() function in PySpark.
Common types of joins include inner join, outer join, left join, and right join.
Example: df1.join(df2, df1.key == df2.key, 'inner')
Use broadcast join or partition join in pyspark to join two large tables efficiently.
Use broadcast join for smaller table and partition join for larger table.
Broadcast join - broadcast the smaller table to all worker nodes.
Partition join - partition both tables on the join key and join them.
Example: df1.join(broadcast(df2), 'join_key')
Example: df1.join(df2, 'join_key').repartition('join_key')
df.explain() in pyspark is used to display the physical plan of the DataFrame operations.
df.explain() is used to show the execution plan of the DataFrame operations in pyspark.
It helps in understanding how the operations are being executed and optimized by Spark.
The output of df.explain() includes details like the logical and physical plans, optimizations applied, and stages of execution.
Spark architecture is a distributed computing framework that consists of a driver program, cluster manager, and worker nodes.
Spark driver program coordinates the execution of tasks and maintains the overall state of the application.
Cluster manager allocates resources for the application and monitors its execution.
Worker nodes execute the tasks assigned by the driver program and store data in memory or disk.
Spark archit...
Lineage graph is used to track the flow of data from source to destination, helping in understanding data dependencies and impact analysis.
Helps in understanding data dependencies and relationships
Tracks the flow of data from source to destination
Aids in impact analysis and troubleshooting
Useful for data governance and compliance
Can be visualized to easily comprehend complex data pipelines
External tables store data outside the database while internal tables store data within the database.
External tables reference data stored outside the database, such as in HDFS or S3, while internal tables store data within the database itself.
External tables are typically used for data that is not managed by the database system, while internal tables are used for data that is managed by the database system.
External ta...
Join DF's, count events, filter users with 0 events
Use join operation to combine DF1 and DF2 on UserID
Group by UserID and count the number of events
Filter out users with 0 events
I was interviewed in Feb 2025.
I was interviewed in Jan 2025.
Multi cast in Angular allows multiple subscribers to receive the same data from a single source.
Used to broadcast data to multiple subscribers
Helps in reducing duplicate API calls
Can be implemented using Subjects in RxJS
Event emitter is used in Angular to facilitate communication between components by emitting events.
Event emitter is a class in Angular that allows components to emit custom events.
It is used to facilitate communication between parent and child components.
Parent components can subscribe to these events and react accordingly.
Example: Child component emitting an event to notify the parent component about a change.
Use RxJS to handle multiple API calls efficiently in Angular.
Use RxJS operators like forkJoin, combineLatest, or mergeMap to handle multiple API calls concurrently or sequentially.
Consider using catchError operator to handle errors and retry operator to retry failed API calls.
Use switchMap operator to cancel previous API calls when making new ones to avoid memory leaks.
Utilize subjects or BehaviorSubjects to share data
Child route is used for nested routes within a parent route, while forRoot is used for configuring routes at the root level of the application.
Child routes are defined within the parent route's configuration, allowing for nested routing structures.
forRoot is used in the AppRoutingModule to configure routes at the root level of the application.
Child routes are typically used for organizing and managing related component...
What people are saying about Capgemini
I have worked with design patterns such as Singleton, Factory, Observer, and Strategy.
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Factory pattern creates objects without specifying the exact class of object that will be created.
Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified a...
I would immediately investigate the issue, identify the root cause, and work on a solution to prevent it from happening again.
Investigate the issue thoroughly to understand the scope and impact
Identify the root cause by analyzing logs, code, and configurations
Work on a solution to fix the issue and prevent it from reoccurring
Communicate with stakeholders about the issue and the steps taken to resolve it
Yes, I am able to work under pressure by staying organized, prioritizing tasks, and maintaining a positive attitude.
I stay organized by creating to-do lists and setting deadlines for tasks.
I prioritize tasks based on urgency and importance to ensure critical tasks are completed first.
I maintain a positive attitude by taking short breaks, practicing deep breathing exercises, and seeking support from colleagues when need
SOLID is a set of five principles in object-oriented programming that help make software designs more understandable, flexible, and maintainable.
S - Single Responsibility Principle: A class should have only one reason to change.
O - Open/Closed Principle: Software entities should be open for extension but closed for modification.
L - Liskov Substitution Principle: Objects of a superclass should be replaceable with object...
Capgemini interview questions for popular designations
I was interviewed in Sep 2024.
Get interview-ready with Top Capgemini Interview Questions
I was interviewed in Jan 2025.
Identify first occurrences of vowels in a string and return their indices along with count.
Loop through the string and check if each character is a vowel (a, e, i, o, u)
Store the index of the first occurrence of each vowel in a separate array
Return the array of indices and the count of indices
Calculate the difference between two integers and find how many numbers within that difference are divisible by 3.
Calculate the absolute difference between the two integers
Iterate through the range of numbers within the difference and check if each number is divisible by 3
Keep a count of numbers divisible by 3
Content negotiation in ASP .Net Web API allows clients to request data in different formats like JSON, XML, etc.
Content negotiation is the process of selecting the best representation for a given response when there are multiple representations available.
In ASP .Net Web API, content negotiation is handled by the MediaTypeFormatter class which selects the appropriate formatter based on the request headers.
Clients can sp...
Git conflicts can be resolved by merging changes, resolving conflicts manually, and using tools like Git mergetool.
Merge changes from the conflicting branches
Resolve conflicts manually by editing the conflicting files
Use Git mergetool to help resolve conflicts
Commit the resolved changes after resolving conflicts
Static constructor is used to initialize static data members of a class.
Executed only once when the class is first accessed
Cannot have any access modifiers or parameters
Used to initialize static variables or perform any necessary setup tasks
To invoke methods from two interfaces with same method names, use explicit interface implementation.
Use explicit interface implementation to differentiate between the methods from each interface.
Specify the interface name followed by the method name to invoke the desired method.
Example: InterfaceA.Method() and InterfaceB.Method() to invoke methods from InterfaceA and InterfaceB respectively.
Count the occurrence of each character in a given string.
Iterate through the string and use a hashmap to store the count of each character.
Handle both uppercase and lowercase characters separately.
Consider using ASCII values to map characters to their respective counts.
Rest is lightweight, WCF is feature-rich. Rest uses HTTP, WCF uses SOAP. Rest is platform-independent, WCF is Microsoft-centric.
Rest is lightweight and simple to use, making it ideal for web services. WCF is feature-rich and provides more advanced capabilities.
Rest uses HTTP for communication, making it easier to work with in web environments. WCF uses SOAP, which can be more complex and heavyweight.
Rest is platform-in...
Microservices communicate with each other through APIs, messaging queues, and service discovery.
APIs: Microservices can communicate with each other by exposing APIs that allow them to send and receive data.
Messaging queues: Microservices can use messaging queues like RabbitMQ or Kafka to send messages to each other asynchronously.
Service discovery: Microservices can use service discovery tools like Consul or Eureka to ...
Clustered index physically orders the data rows in the table, while non-clustered index does not.
Clustered index determines the physical order of data rows in the table.
Non-clustered index is a separate structure that contains pointers to the actual data rows.
Clustered index is faster for retrieval of data in the order of the index key.
Non-clustered index is faster for retrieval of data not in the order of the index ke
I applied via Approached by Company and was interviewed in Dec 2024. There was 1 interview round.
Java 8 introduced static and default methods in interfaces, allowing for method implementation and code reusability.
Java 8 introduced static methods in interfaces, allowing for method implementation directly in the interface itself.
Default methods were also introduced in Java 8, enabling interfaces to have method implementations without affecting implementing classes.
Static methods in interfaces can be called using the...
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.
If multiple keys hash to the same index, a linked list is used to handle collisions.
To synchronize a HashMap, you can use the synchronizedMap() m...
No, the program will not compile if the parent class throws a runtime exception while the child class throws an arithmetic exception.
In Java, if a parent class method throws a checked exception, the child class method can only throw the same exception or its subclasses.
ArithmeticException is an unchecked exception, so if the parent class throws a checked exception and the child class throws an unchecked exception, the ...
Configure JDBC in Spring Boot to specify which database to use
Define multiple DataSource beans in the configuration class
Use @Primary annotation to specify the primary DataSource
Use @Qualifier annotation to specify the secondary DataSource
Inject the DataSource beans where needed in the application
To use a Jetty server in a Spring Boot application, you can configure it as a dependency and customize its settings.
Add Jetty server dependency in your pom.xml file
Exclude Tomcat server dependency if it's included by default in Spring Boot
Configure Jetty server settings in application.properties or application.yml file
Example: Add Jetty dependency - <dependency> <groupId>org.springframework.boot</groupId...
RequestParam is used to extract query parameters from the URL, while PathVariable is used to extract values from the URI path.
RequestParam is used for query parameters in the URL, while PathVariable is used for values in the URI path.
RequestParam is optional, while PathVariable is required.
RequestParam is used with the @RequestParam annotation, while PathVariable is used with the @PathVariable annotation.
Example: @Requ...
I would implement timeout mechanisms and retries to handle the scenario of one microservice awaiting a response from another microservice taking an extended time.
Implement timeout mechanisms in the calling microservice to limit the waiting time for a response.
Set up retry logic to automatically resend the request to the slow microservice if no response is received within the specified timeout period.
Use circuit breaker...
I was interviewed in Feb 2025.
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
SOLID principles in Java focus on object-oriented design principles. Java 8 features like lambdas and streams adhere to these principles.
S - Single Responsibility Principle: Java 8 lambdas allow for defining single-purpose functions.
O - Open/Closed Principle: Java 8 streams enable extending behavior without modifying existing code.
L - Liskov Substitution Principle: Java 8 interfaces support polymorphism and substitutio...
A Singleton class in Java ensures that only one instance of the class is created and provides a global point of access to it.
Use a private static instance variable to hold the single instance of the class.
Make the constructor private to prevent instantiation from outside the class.
Provide a public static method to access the single instance, creating it if necessary.
A controller is a component in the Model-View-Controller (MVC) design pattern that handles user input and updates the model and view accordingly.
Controls the flow of the application
Interacts with the model to update data
Receives input from the user and processes it
Updates the view based on changes in the model
Examples: Spring MVC Controller, JavaFX Controller
Code to print unique elements from an array of strings
Create a HashSet to store unique elements
Iterate through the array and add elements to the HashSet
Print out the elements in the HashSet to get unique elements
Code to find the second largest element in an array
Iterate through the array and keep track of the largest and second largest elements
Initialize variables to store the largest and second largest elements
Compare each element with the largest and second largest elements and update accordingly
Hash collision occurs when two different inputs produce the same hash value. hashCode() and equals() methods are from Object class.
Hash collision can occur when two different objects have the same hash code value.
hashCode() method is used to get the hash code value of an object.
equals() method is used to compare two objects for equality.
Circuit breaker is a design pattern used to prevent cascading failures in distributed systems.
Circuit breaker monitors for failures and trips when a threshold is reached
It then redirects calls to a fallback mechanism to prevent further failures
Once the system stabilizes, the circuit breaker can be reset to allow normal operation
ControllerAdvice in Spring Boot is used for global exception handling in RESTful APIs.
Create a class annotated with @ControllerAdvice
Use @ExceptionHandler to define methods to handle specific exceptions
Use @RestControllerAdvice for returning JSON responses
I was interviewed in Dec 2024.
I have over 10 years of experience in designing and implementing complex software systems.
Designed and implemented scalable software solutions for various clients
Led a team of developers in delivering projects on time and within budget
Worked closely with stakeholders to gather requirements and ensure customer satisfaction
I have used tools such as ANSYS, Abaqus, and SolidWorks Simulation for performing finite element analysis (FEA).
ANSYS
Abaqus
SolidWorks Simulation
Basic knowledge of strength of materials and finite element method (FEM) is essential for analyzing structural behavior and designing components.
Understanding of stress, strain, and material properties is crucial in analyzing the behavior of materials under different loading conditions.
Knowledge of FEM helps in simulating complex structures and predicting their response to various loads.
Ability to interpret FEM results...
SFD and BMD for cantilever beams of two different materials under point load P at free end
Calculate reactions at the fixed end of the beam
Determine the shear force at different points along the beam by considering the applied load and reactions
Draw the SFD by plotting the shear force values against the beam length
Calculate the bending moment at different points along the beam using the shear force values
Draw the BMD by...
Static analysis is a software testing technique used to analyze code without executing it.
Identify potential bugs and security vulnerabilities in the code
Ensure code quality and adherence to coding standards
Help in detecting performance issues and memory leaks
Examples: linting tools like ESLint, static code analyzers like SonarQube
I was interviewed in Dec 2024.
Implementing an explicit wait in Selenium using WebDriverWait class
Import WebDriverWait class from Selenium
Specify the maximum time to wait and the polling interval
Use ExpectedConditions to define the condition to wait for
Apply the wait to a specific element or the entire page
Implementing a Robot class in Java
Create a Robot class with attributes like name, batteryLevel, etc.
Include methods for moving, turning, and charging the robot
Use inheritance if needed for different types of robots
To locate the Xpath for the 'Today's Deal' menu item on Amazon, inspect the element using browser developer tools.
Open the Amazon website and right-click on the 'Today's Deal' menu item.
Select 'Inspect' to open the browser developer tools.
Look for the HTML code corresponding to the 'Today's Deal' menu item.
Right-click on the HTML code and choose 'Copy' > 'Copy XPath'.
The copied XPath can be used to locate the 'Today
str1 will be stored in the string pool while str2 will be stored in the heap memory.
str1 will be stored in the string pool, which is a part of the heap memory.
str2 will create a new String object in the heap memory, separate from the string pool.
str1==str2 compares the memory addresses of the two strings, while str1.equals(str2) compares the actual contents of the strings.
str1==str2 checks if the two string variables point to the same memory location.
str1.equals(str2) compares the actual characters in the strings for equality.
Example: String str1 = "hello"; String str2 = "hello"; str1==str2 will return false, but str1.equals(str2) will return true.
401 - Unauthorized, 502 - Bad Gateway
401 status code indicates that the request requires user authentication
502 status code indicates that the server received an invalid response from an upstream server
Print first 4 and last 4 letters of a given string
Use string slicing to extract the first 4 letters: str[:4]
Use string slicing to extract the last 4 letters: str[-4:]
Some of the top questions asked at the Capgemini interview -
The duration of Capgemini interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 3.7k interviews
Interview experience
based on 41.8k reviews
Rating in categories
Consultant
55.1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Associate Consultant
50.7k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Consultant
46.1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Analyst
20.7k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
20.2k
salaries
| ₹0 L/yr - ₹0 L/yr |
Wipro
Accenture
Cognizant
TCS