
Capgemini


10+ Capgemini Software Developer Interview Questions and Answers for Freshers
Q1. Find the Duplicate Number Problem Statement
Given an integer array 'ARR' of size 'N' containing numbers from 0 to (N - 2). Each number appears at least once, and there is one number that appears twice. Your tas...read more
Find the duplicate number in an array of integers from 0 to (N - 2).
Iterate through the array and keep track of the frequency of each number using a hashmap.
Return the number that has a frequency greater than 1 as it is the duplicate number.
Q2. Minimum Operations to Make Strings Equal
Given two strings A
and B
consisting of lowercase English letters, determine the minimum number of pre-processing moves required on string A
to make it equal to string B...read more
The minimum number of pre-processing moves required on string A to make it equal to string B using specified operations.
Iterate through both strings simultaneously and check for differences.
Count the number of differences that can be fixed using the specified operations.
Return the count as the minimum number of pre-processing moves required.
Q3. Ways To Make Coin Change
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more
The task is to find the total number of ways to make change for a specified value using given denominations.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of ways to make change for each value using different denominations.
Iterate through the denominations and update the array based on the current denomination.
The final answer will be in the last cell of the 2D array.
Q4. The Skyline Problem
Compute the skyline of given rectangular buildings in a 2D city, eliminating hidden lines and forming the outer contour of the silhouette when viewed from a distance. Each building is descri...read more
Compute the skyline of given rectangular buildings in a 2D city, eliminating hidden lines and forming the outer contour of the silhouette when viewed from a distance.
Iterate through the buildings and create a list of critical points (x, y) where the height changes.
Sort the critical points based on x-coordinate and process them to form the skyline.
Merge consecutive horizontal segments of equal height into one to ensure no duplicates in the output.
Q5. Wildcard Pattern Matching Problem Statement
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
The wildcard pattern may include the charac...read more
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
Create a recursive function to match the pattern with the text character by character.
Handle the cases for '?' and '*' characters in the pattern.
Keep track of the current positions in the pattern and text while matching.
Return 'True' if the pattern matches the text completely, otherwise return 'False'.
Q6. Time to Burn Tree Problem
You are given a binary tree consisting of 'N' unique nodes and a start node where the burning will commence. The task is to calculate the time in minutes required to completely burn th...read more
Calculate the time in minutes required to completely burn a binary tree starting from a given node.
Perform a depth-first search (DFS) to calculate the time taken to burn the entire tree.
Keep track of the time taken to burn each node and return the maximum time as the result.
Consider the edge cases where the tree is empty or only consists of the start node.
Q7. Anagram Pairs Verification Problem
Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other...read more
Determine if two strings are anagrams of each other by checking if they have the same characters in different order.
Create a frequency map of characters for both strings and compare them.
Sort both strings and check if they are equal.
Use a hash table to store character counts and compare the counts for both strings.
Q8. Next Greater Number Problem Statement
Given a string S
which represents a number, determine the smallest number strictly greater than the original number composed of the same digits. Each digit's frequency from...read more
Given a number represented as a string, find the smallest number greater than the original with the same set of digits.
Iterate from right to left to find the first digit that can be swapped with a larger digit to make the number greater.
Swap this digit with the smallest digit to its right that is larger than it.
Sort the digits to the right of the swapped digit in ascending order to get the smallest number greater than the original.
If no such number exists, return -1.
Example: ...read more
Q9. Kth Largest Number Problem Statement
Design a data structure to handle a stream of numbers dynamically and efficiently find the kth largest number at any given moment.
Explanation:
You will be presented with a ...read more
Design a data structure to handle a stream of numbers and efficiently find the kth largest number at any given moment.
Implement a data structure that can accept an infinite stream of numbers
Efficiently find the kth largest number at any given moment
Handle queries of type 1 to add numbers and type 2 to find the kth largest number
Maintain the pool of numbers and update it dynamically based on queries
Q10. Circular Move Problem Statement
You have a robot currently positioned at the origin (0, 0) on a two-dimensional grid, facing the north direction. You are given a sequence of moves in the form of a string of len...read more
Determine if a robot's movement path is circular on a 2D grid given a sequence of moves.
Create a set of directions to keep track of the robot's current direction (north, east, south, west).
Simulate the robot's movement based on the given sequence of moves (L - turn left, R - turn right, G - move forward).
Check if the robot returns to the starting position after completing the sequence of moves.
Example: For 'GLGLGLG', the robot moves in a circular path and returns to the start...read more
Q11. 1)What is oops? 2)difference between method overloading and method overriding? 3)what is static?
Answers to common questions asked in a software developer interview.
OOPs stands for Object-Oriented Programming which is a programming paradigm based on the concept of objects.
Method overloading is when multiple methods have the same name but different parameters, while method overriding is when a subclass provides its own implementation of a method that is already present in its parent class.
Static is a keyword used to create variables and methods that belong to a class rath...read more
Q12. What are the important categaries of software?
The important categories of software are system software, application software, and programming software.
System software: manages computer hardware and provides common services for other software. Examples: operating systems, device drivers, firmware.
Application software: performs specific tasks for end-users. Examples: word processors, web browsers, video games.
Programming software: provides tools for software developers to create, debug, and maintain software. Examples: com...read more
Q13. Why do you use two mobile numbers
To separate personal and professional calls, and to ensure availability and accessibility.
Separate personal and professional calls
Ensure availability and accessibility
Maintain work-life balance
Avoid mixing personal and work-related contacts
Q14. 1. Introduce yourself 2. How to fetch 50% record from table using SQL query
To fetch 50% records from a table using SQL query
Use the LIMIT clause to specify the number of records to return
Calculate 50% of the total records in the table to determine the limit value
Order the records in a specific way if needed before applying the LIMIT clause
Q15. 4)what is java& feature of java?
Java is a popular programming language known for its portability and security features.
Java is an object-oriented language
It is platform-independent and can run on any device with a JVM
Java has automatic memory management through garbage collection
It has strong security features such as sandboxing and encryption
Java has a vast library of pre-built classes and APIs
Examples of Java-based applications include Android apps, enterprise software, and web applications
Q16. what is filter in java 8
Filter in Java 8 is a method used to iterate through a collection and filter out elements based on a specified condition.
Filter is a method in the Stream interface in Java 8.
It takes a Predicate as an argument to specify the condition for filtering.
Example: List
names = Arrays.asList("Alice", "Bob", "Charlie"); List filteredNames = names.stream().filter(name -> name.startsWith("A")).collect(Collectors.toList());
Q17. Java opps concept and implementation
Java OOPs concepts refer to the principles of Object-Oriented Programming and their implementation in Java.
Java OOPs concepts 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 involves hiding the imple...read more
More about working at Capgemini







Top HR Questions asked in Capgemini Software Developer for Freshers
Interview Process at Capgemini Software Developer for Freshers

Top Software Developer Interview Questions from Similar Companies







Reviews
Interviews
Salaries
Users/Month

