Capegemini Consulting India Private Limited interview experience Real time questions & tips from candidates to crack your interview

Senior Software Engineer

Capegemini Consulting India Private Limited
upvote
share-icon
3 rounds | 13 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, System Design, Java , Selenium , Spring Boot, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Referral
Eligibility: Above 2 years of experience
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Medium
Video Call
Duration60 Minutes
Interview date5 Feb 2020
Coding problem5

This round consisted of questions from DS/Algo , OOPS and Operating Systems primarily usage of some basic UNIX commands .

1. Kth Largest Number

Moderate
30m average time
65% success
0/80
Asked in companies
Wells FargoGoldman SachsPhonePe

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 to design a data structure which can accept infinite numbers and can return the 'kth' largest number at any given time.


The stream of numbers is nothing but a large collection of numbers from which integers are read at runtime, such as the user will never know the upper limit on the number of integers that will be read.


The implemented data structure must support the following operations:

1. add(DATA) :
   This function should take one argument of type and store it in its pool and returns the 'kth' largest number from the current pool of integers.

You will be given 'q' queries:

val - For this query, insert the integer into your current pool of integers and return the 'kth' largest integer from the existing pool of integers.
Note
 1. The maximum number of integers that will be given will always be under memory limits.

 2. You will also be given an initial pool of integers whose size equals k.

 3. The maximum number of queries will be less than 10^5.

 4. The 'kth' largest element is not the 'kth' distinct element but the 'kth' largest element in the sorted order.

 5. There will be at least one query of type 2.
Problem approach

Approach : 

1) We can initialize the queue with the initial pool of numbers and use the queue as min-heap.

2) Initially, as the size of the queue is ‘k’ the top element will be the kth largest element of the pool.

3) When reading numbers at runtime i.e reading integers from the stream, we can add the integer to the queue, and if the size of the queue becomes greater than k, we pop the top element from the queue and then return the top element.

4) The top element was removed.

5) If the added element is less than the current kth largest, then this number will surely come at the top of the queue and we don’t need this number as the previous kth largest is still the kth largest number in the current pool.

TC : O(N * log(K)), where ‘N’ is the maximum number of integers we are reading at run time and ‘K’ is the order of the required number in sorted order.

SC : O(N)

Try solving now

2. OOPS Question

What is an interface?

Problem approach

An interface refers to a special type of class, which contains methods, but not their definition. Only the declaration of methods is allowed inside an interface. To use an interface, you cannot create objects. Instead, you need to implement that interface and define the methods for their implementation.

3. OOPS Question

Explain SOLID principles in Object Oriented Design .

Problem approach

Answer :
The SOLID principle is an acronym of the five principles which is given below :

1) Single Responsibility Principle (SRP)
2) Open/Closed Principle
3) Liskov’s Substitution Principle (LSP)
4) Interface Segregation Principle (ISP)
5) Dependency Inversion Principle (DIP)

Uses of SOLID design principles :

1) The SOLID principle helps in reducing tight coupling.
2) Tight coupling means a group of classes are highly dependent on one another which we should avoid in our code.
3) Opposite of tight coupling is loose coupling and our code is considered as a good code when it has loosely- coupled classes.
4) Loosely coupled classes minimize changes in your code, helps in making code more reusable, maintainable, flexible and stable.


Explaining the 5 SOLID principles one by one :

1) Single Responsibility Principle : This principle states that “a class should have only one reason to change” which means every class should have a single responsibility or single job or single purpose.
Use layers in your application and break God classes into smaller classes or modules.

2) Open/Closed Principle : This principle states that “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification” which means you should be able to extend a class behavior, without modifying it. Using this principle separates the existing code from the modified code so it provides better stability, maintainability and minimizes changes as in your code.

3) Liskov’s Substitution Principle : According to this principle “Derived or child classes must be substitutable for their base or parent classes“. This principle ensures that any class that is the child of a parent class should be usable in place of its parent without any unexpected behavior.

4) Interface Segregation Principle : This principle is the first principle that applies to Interfaces instead of classes in SOLID and it is similar to the single responsibility principle. It states that “do not force any client to implement an interface which is irrelevant to them“. Here your main goal is to focus on avoiding fat interface and give preference to many small client-specific interfaces.

5) Dependency Inversion Principle : Two key points are here to keep in mind about this principle
a) High-level modules/classes should not depend on low-level modules/classes. Both should depend upon
abstractions.
b) Abstractions should not depend upon details. Details should depend upon abstractions.

4. OS Question

Explain Piping in Unix/Linux

Problem approach

Answer :
1) A pipe is a form of redirection (transfer of standard output to some other destination) that is used in Linux and other Unix-like operating systems to send the output of one command/program/process to another command/program/process for further processing.

2) The Unix/Linux systems allow stdout of a command to be connected to stdin of another command. We can make it do so by using the pipe character ‘|’.

3) Pipe is also used to combine two or more commands, and in this, the output of one command acts as input to another command, and this command’s output may act as input to the next command and so on.

4) It can also be visualized as a temporary connection between two or more commands/ programs/ processes. The command line programs that do the further processing are referred to as filters.

Examples :
1) Listing all files and directories and give it as input to more command.
$ ls -l | more

2) Use sort and uniq command to sort a file and print unique values.
$ sort record.txt | uniq

3) Use head and tail to print lines in a particular range in a file.
$ cat sample2.txt | head -7 | tail -5

5. OS Question

What do chmod, chown, chgrp commands do?

Problem approach

These are file management commands. These are used for:

chmod - It changes the permission set of a file
chown - It changes the ownership of the file.
chgrp - It changes the group of the file.

Example :
$ chmod g+w test
It changes permission for a user group to write.

$ chown adas1923 testfile
It changes the owner of testfile to adas1923.

$ chgrp moderators testfile
It changes a group of testfile to moderators.

02
Round
Medium
Video Call
Duration60 Minutes
Interview date5 Feb 2020
Coding problem6

This round had questions revolving around OS , Selenium and some common concepts from DBMS. The interviewer was quite experienced and made the whole interview quite wholesome for me.

1. OS Question

Explain any 5 essential UNIX commands .

Problem approach

Answer :
1) ls -> Lists files in current directory
2) cd -> Change directory to tempdir
3) mkdir -> Make a directory called graphics
4) rmdir -> Remove directory (must be empty)
5) cp -> Copy file into directory

2. SpringBoot Question

How to enable Actuator in Spring boot application?

Problem approach

To enable the spring actuator feature, we need to add the dependency of “spring-boot-starter-actuator” in pom.xml.
Code :
org.springframework.boot
spring-boot-starter-actuator 
 

3. SpringBoot Question

What is Spring Boot starter? How is it useful?

Problem approach

Spring Boot has many starters. They are a set of convenient dependency descriptors. Starter allows you to include these descriptors in your pom.xml.
For example, If you want to work with Spring MVC, you can include “spring–boot–starter–web” as a dependency in pom.xml.

4. SpringBoot Question

What is dependency Injection?

Problem approach

The process of injecting dependent bean objects into target bean objects is called dependency injection.

1) Setter Injection: The IOC container will inject the dependent bean object into the target bean object by calling the setter method.
2) Constructor Injection: The IOC container will inject the dependent bean object into the target bean object by calling the target bean constructor.
3) Field Injection: The IOC container will inject the dependent bean object into the target bean object by Reflection API.

5. DBMS Question

What is Self-Join and Cross-Join ?

Problem approach

Self-Join : A self JOIN is a case of regular join where a table is joined to itself based on some relation between its own column(s). Self-join uses the INNER JOIN or LEFT JOIN clause and a table alias is used to assign different names to the table within the query.

Cross-Join : Cross join can be defined as a cartesian product of the two tables included in the join. The table after join contains the same number of rows as in the cross-product of the number of rows in the two tables. If a WHERE clause is used in cross join then the query will work like an INNER JOIN.

6. DBMS Question

What are views in SQL?

Problem approach

Answer :
1) Views in SQL are kind of virtual tables.
2) A view also has rows and columns as they are in a real table in the database.
3) We can create a view by selecting fields from one or more tables present in the database.
4) A View can either have all the rows of a table or specific rows based on certain condition.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date5 Feb 2020
Coding problem2

This is a cultural fitment testing round .HR was very frank and asked standard questions. Then we discussed about my role.

1. Basic HR Question

Why should we hire you ?

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

2. Basic HR Question

Why are you looking for a job change?

Problem approach

General Tip : For an experienced professional seeking a change, this is a common question. The easiest method to respond to this question is to state that you are leaving your current work in order to advance your career. Make sure you don't criticize or speak poorly about the company where you now work.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
Senior Software Engineer
3 rounds | 13 problems
Interviewed by Capegemini Consulting India Private Limited
840 views
0 comments
0 upvotes
Senior Software Engineer
2 rounds | 5 problems
Interviewed by Capegemini Consulting India Private Limited
1173 views
0 comments
0 upvotes
Senior Software Engineer
2 rounds | 3 problems
Interviewed by Capegemini Consulting India Private Limited
967 views
0 comments
0 upvotes
Senior Software Engineer
1 rounds | 3 problems
Interviewed by Capegemini Consulting India Private Limited
1104 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Senior Software Engineer
1 rounds | 6 problems
Interviewed by Arcesium
3920 views
0 comments
0 upvotes
company logo
Senior Software Engineer
3 rounds | 3 problems
Interviewed by Ernst & Young (EY)
5173 views
0 comments
0 upvotes
company logo
Senior Software Engineer
3 rounds | 3 problems
Interviewed by HCL Technologies
3156 views
3 comments
0 upvotes