Add office photos
Employer?
Claim Account for FREE

Airtel Africa

3.0
based on 139 Reviews
Filter interviews by

Capgemini Interview Questions and Answers

Updated 5 Feb 2024

Q1. Find index of an element in a sorted, n-bit rotated array.

Ans.

Finding index of an element in a sorted, n-bit rotated array.

  • Use binary search to find the pivot point where the array is rotated.

  • Determine which side of the pivot point the target element lies.

  • Perform binary search on the appropriate side of the pivot to find the target element.

  • Handle edge cases such as when the target element is the pivot point itself.

Add your answer

Q2. Build a single sorted linked list from two sorted linked list without using auxiliary space

Ans.

Merge two sorted linked lists without using extra space

  • Traverse both lists simultaneously and compare nodes

  • Attach smaller node to result list and move pointer to next node

  • Repeat until both lists are exhausted

  • Return the head of the merged list

Add your answer

Q3. Find the first character with least occurrence in a string

Ans.

Find the first character with least occurrence in a string

  • Iterate through the string and count the occurrence of each character

  • Find the character with the least occurrence

  • Return the first occurrence of that character

Add your answer

Q4. Meaning of dependency injection and inversion of control

Ans.

Dependency injection is a design pattern that allows objects to receive dependencies from external sources, while inversion of control is a principle that states that the control of object creation and lifecycle should be handed over to a container or framework.

  • Dependency injection is a way to achieve loose coupling between objects

  • Inversion of control is a principle that promotes decoupling of components

  • Dependency injection is often used in conjunction with inversion of contr...read more

Add your answer
Discover Capgemini interview dos and don'ts from real experiences

Q5. Difference between @Service, @Repository, @Component, @Controller

Ans.

Annotations used in Spring Framework for different layers of application

  • All are used for dependency injection and component scanning

  • @Service is used for service layer

  • @Repository is used for data access layer

  • @Component is used for general purpose beans

  • @Controller is used for MVC controller layer

Add your answer

Q6. Difference between @Controller, @RestController

Ans.

Difference between @Controller and @RestController

  • Both are used for handling HTTP requests in Spring framework

  • @Controller returns a view while @RestController returns data in JSON/XML format

  • @RestController is a combination of @Controller and @ResponseBody annotations

  • Use @Controller for traditional web applications and @RestController for RESTful web services

Add your answer

Q7. Difference between @Bean, @Component

Ans.

Both @Bean and @Component are used for creating beans in Spring framework.

  • The @Bean annotation is used to explicitly declare a single bean.

  • The @Component annotation is used to declare a class as a Spring component.

  • The @Bean method is used in a configuration class to create and configure a bean.

  • The @Component annotation is used on a class to indicate that it is a Spring-managed component.

  • The @Bean method can be used to create a bean of any class, not just the one in which it i...read more

Add your answer

Q8. Clock angle problem, number to words

Ans.

Clock angle problem and number to words are common coding problems.

  • Clock angle problem involves finding the angle between the hour and minute hand of a clock at a given time.

  • Number to words involves converting a given number into its word representation.

  • Both problems require logical thinking and can be solved using various approaches.

  • Clock angle problem can be solved using simple mathematical formulas while number to words can be solved using recursion or lookup tables.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Capgemini

based on 1 interviews
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

4.4
 • 43 Interview Questions
4.1
 • 21 Interview Questions
3.8
 • 21 Interview Questions
3.5
 • 10 Interview Questions
3.9
 • 10 Interview Questions
3.8
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter