Grid Dynamics
Capgemini Interview Questions and Answers
Q1. how can you set authorization and authentication in web api ?
Authorization and authentication in web API can be set using various methods like JWT, OAuth, and Identity Framework.
Use JWT (JSON Web Tokens) for token-based authentication
Implement OAuth for secure authorization and authentication
Utilize Identity Framework for managing user authentication and authorization
Set up roles and policies to control access to resources
Q2. Write functional interface and lemda expression to add two numbers
Functional interface and lambda expression to add two numbers in Java
Create a functional interface with a method that takes two integers as parameters and returns an integer
Implement the functional interface using a lambda expression to add the two numbers
Call the method using the lambda expression to add two numbers
Q3. What is @ peek annotation, @qualifier annotation
The @Peek annotation is used in Java to mark a method as a peek operation in a stream. The @Qualifier annotation is used in Spring to specify which bean should be autowired when multiple beans of the same type are present.
The @Peek annotation is used in Java streams to perform a side-effect operation on each element without changing the elements themselves.
The @Qualifier annotation in Spring is used to disambiguate beans of the same type by specifying the bean name to be inje...read more
Q4. What is the code to reverse a linked list?
Reversing a linked list involves changing the direction of pointers to go from the end to the beginning.
Create three pointers: current, previous, and next.
Iterate through the linked list, updating pointers to reverse the direction.
Return the new head of the reversed linked list.
Q5. Spring boot vs Spring mvc
Spring Boot is an opinionated framework for building stand-alone, production-grade Spring-based applications. Spring MVC is a part of the Spring Framework for building web applications.
Spring Boot is used for creating standalone Spring applications with minimal configuration, while Spring MVC is used for building web applications.
Spring Boot provides auto-configuration and embedded servers for easy deployment, while Spring MVC requires more manual configuration.
Spring Boot si...read more
Q6. what are oops concepts with examples.
OOPs concepts are fundamental principles of object-oriented programming like inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class. Example: Animal class can inherit from Mammal class.
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: Using private variables and public methods in a class.
Polymorphism: Ability of a method to do different things base...read more
Q7. 1. WAP to find maximum product of sub array 2. WAP to find pair sum in 2 arrays Questions of OOPs, Multithreading, Collections, Java 8, Spring Boot, JPA, Microservices
Q8. How to optimize Spark job.
Optimizing Spark job involves tuning configurations, partitioning data, caching, and using efficient transformations.
Tune Spark configurations like executor memory, cores, and parallelism for optimal performance.
Partition data correctly to distribute workload evenly across nodes and avoid shuffling.
Cache intermediate results in memory to avoid recomputation.
Use efficient transformations like map, filter, and reduceByKey instead of costly operations like groupByKey.
Optimize da...read more
Interview Process at Capgemini
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month