Capita pvt ltd interview experience Real time questions & tips from candidates to crack your interview

Software Consultant

Capita pvt ltd
upvote
share-icon
3 rounds | 17 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, OOPS, Java, DBMS, DB2, SQL
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: Campus
Eligibility: Above 7 CGPA
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
Easy
Face to Face
Duration60 Minutes
Interview date4 May 2019
Coding problem8

In this round, I was first asked a simple coding question related to Recursion and then the interviewer switched the topic of discussion towards Java and OOPS and towards the end of the interview I was also asked some questions revolving around DB2 and DBMS.

1. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
SprinklrCIS - Cyber InfrastructureSamsung

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols and whitespaces.

Note :

String 'S' is NOT case sensitive.

Example :

Let S = “c1 O$d@eeD o1c”.
If we ignore the special characters, whitespaces and convert all uppercase letters to lowercase, we get S = “c1odeedo1c”, which is a palindrome. Hence, the given string is also a palindrome.
Problem approach

Code : 

import java.util.*;
public class Test { 
public static void main(String args[]) { 
Scanner s = new Scanner(System.in);
String word = s.nextLine();
System.out.println("Is "+word+" palindrome? - "+isWordPalindrome(word));



public static boolean isWordPalindrome(String word){ 
String reverseWord = getReverseWord(word); 
//if word equals its reverse, then it is a palindrome
if(word.equals(reverseWord)){ 
return true; 

return false; 


public static String getReverseWord(String word){ 
if(word == null || word.isEmpty()){ 
return word; 


return word.charAt(word.length()- 1) + getReverseWord(word.substring(0, word.length() - 1)); 



TC : O(N), where N = length of the string

Try solving now

2. Java Question

How many types of memory areas are allocated by JVM?

Problem approach

1) Class(Method) Area: Class Area stores per-class structures such as the runtime constant pool, field, method data,
and the code for methods.

2) Heap: It is the runtime data area in which the memory is allocated to the objects

3) Stack: Java Stack stores frames. It holds local variables and partial results, and plays a part in method invocation
and return. Each thread has a private JVM stack, created at the same time as the thread. A new frame is created
each time a method is invoked. A frame is destroyed when its method invocation completes.

4) Program Counter Register: PC (program counter) register contains the address of the Java virtual machine
instruction currently being executed.

5) Native Method Stack: It contains all the native methods used in the application.

3. Java Question

How would you differentiate between a String, StringBuffer, and a StringBuilder?

Problem approach

1) Storage area : In string, the String pool serves as the storage area. For StringBuilder and StringBuffer, heap
memory is the storage area.

2) Mutability : A String is immutable, whereas both the StringBuilder and StringBuffer are mutable.

3) Efficiency : It is quite slow to work with a String. However, StringBuilder is the fastest in performing operations. The
speed of a StringBuffer is more than a String and less than a StringBuilder. (For example appending a character is
fastest in StringBuilder and very slow in String because a new memory is required for the new String with appended
character.)

4) Thread-safe : In the case of a threaded environment, StringBuilder and StringBuffer are used whereas a String is
not used. However, StringBuilder is suitable for an environment with a single thread, and a StringBuffer is suitable for
multiple threads.

4. DB2 Question

Mention the way of highlighting as well as putting a CURSOR to use in a COBOL program.

Problem approach

The best way of putting a CURSOR to use in a COBOL program is to make use of DECLARE CURSOR, which can be used either in procedure division operation or in working storage. This is being done basically to highlight the SELECT statement. Once DECLARE CURSOR is used, this is followed by OPEN, FETCH and finally CLOSE.

5. DB2 Question

How to find the number of rows and eliminate duplicate values in a DB2 table?

Problem approach

To find number of rows : The user has to use SELECT COUNT (*) on the DB2 query.

To eliminate duplicate values from DB2 SELECT : The user has to use SELECT DISTINCT in the DB2 query.

6. SQL Question

Write a query that joins two tables A and B having common attribute ID and selects records(ID_NAME) that have
matching ID values in both tables .

Problem approach

SELECT A.ID_Name, B.ID_Name
FROM A
INNER JOIN B ON A.ID=B.ID;

7. DBMS Question

What is meant by normalization and denormalization?

Problem approach

Normalization is a process of reducing redundancy by organizing the data into multiple tables. Normalization leads to
better usage of disk spaces and makes it easier to maintain the integrity of the database.


Denormalization is the reverse process of normalization as it combines the tables which have been normalized into a
single table so that data retrieval becomes faster. JOIN operation allows us to create a denormalized form of the data
by reversing the normalization.

8. DBMS Question

What is Correlated Subquery in DBMS?

Problem approach

A Subquery is also known as a nested query i.e. a query written inside some query. When a Subquery is executed for each of the rows of the outer query then it is termed as a Correlated Subquery.

Example of Non-Correlated Subquery is :

SELECT * from EMP WHERE ‘JOHN’ IN (SELECT Name from DEPT WHERE EMP.EMPID=DEPT.EMPID);

02
Round
Medium
Face to Face
Duration50 Minutes
Interview date4 May 2019
Coding problem8

This round had questions primarily from Spring Boot and Java. The interviewer was quite friendly and helped me with small hints when he felt I was stuck. Overall, this round went preety well.

1. Spring Boot Question

What are the major differences between RequestMapping and GetMapping?

Problem approach

RequestMapping can be used with GET, POST, PUT, and many other request methods using the method attribute on
the annotation. Whereas GetMapping is only an extension of RequestMapping, which helps you to improve clarity on
requests.

2. Spring Boot Question

How does Spring Boot works?

Problem approach

Spring Boot automatically configures your application based on the dependencies you have added to the project by
using annotation. The entry point of the spring boot application is the class that contains @SpringBootApplication
annotation and the main method.

Spring Boot automatically scans all the components included in the project by using @ComponentScan annotation.

3. Spring Boot Question

How MVC works in Spring?

Problem approach

Here is how MVC works in Spring :

1) DispatcherServlet receives a request.

2) After that, the DispatcherServlet communicates with HandlerMapping. It also revokes the controller associated with
that specific request.

3) The Controller processes this request by calling the service methods, and a ModelAndView object is returned by
the DispatcherServlet.

4) The view name is sent to a ViewResolver to find the actual View to invoke.

5) After that, DispatcherServlet is passed to View to render the result.

6) By using the model data, the View renders and sends back result back to the user.

4. Spring Boot Question

Mention a few features of Spring Boot.

Problem approach

Few important features of Spring Boot are as follows:

1) Spring CLI – Spring Boot CLI allows you to Groovy for writing Spring boot application and avoids boilerplate code.

2) Starter Dependency – With the help of this feature, Spring Boot aggregates common dependencies together and eventually improves productivity

3) Auto-Configuration – The auto-configuration feature of Spring Boot helps in loading the default configurations according to the project you are working on. In this way, you can avoid any unnecessary WAR files.

4) Spring Initializer – This is basically a web application, which can create an internal project structure for you. So, you do not have to manually set up the structure of the project, instead, you can use this feature.

5) Spring Actuator – This feature provides help while running Spring Boot applications.

6) Logging and Security – The logging and security feature of Spring Boot, ensures that all the applications made using Spring Boot are properly secured without any hassle.

5. Java Question

What are the features of a lambda expression?

Problem approach

Below are the two significant features of the methods that are defined as the lambda expressions:
1) Lambda expressions can be passed as a parameter to another method.
2) Lambda expressions can be standalone without belonging to any class.

6. Java Question

What are some standard Java pre-defined functional interfaces?

Problem approach

Some of the famous pre-defined functional interfaces from previous Java versions are Runnable, Callable,
Comparator, and Comparable. While Java 8 introduces functional interfaces like Supplier, Consumer, Predicate, etc.
Please refer to the java.util.function doc for other predefined functional interfaces and its description introduced in
Java 8.

Runnable: use to execute the instances of a class over another thread with no arguments and no return value.

Callable: use to execute the instances of a class over another thread with no arguments and it either returns a value
or throws an exception.

Comparator: use to sort different objects in a user-defined order

Comparable: use to sort objects in the natural sort order

7. OOPS Question

Difference between Abstract class and Interface.

Problem approach

The differences between Abstract Class and Interface are as follows :

Abstract Class:

1) Abstract classes have a default constructor and it is called whenever the concrete subclass is instantiated.
2) It contains Abstract methods as well as Non-Abstract methods.
3) The class which extends the Abstract class shouldn’t require the implementation of all the methods, only Abstract
methods need to be implemented in the concrete sub-class.
4) Abstract class contains instance variables.


Interface:

1 )It doesn’t have any constructor and couldn’t be instantiated.
2) The abstract method alone should be declared.
3) Classes that implement the interface should provide the implementation for all the methods.
4) The interface contains only constants.

8. OOPS Question

When can you use super keyword?

Problem approach

The super keyword is used to access hidden fields and overridden methods or attributes of the parent class.

Following are the cases when this keyword can be used : 
1) Accessing data members of parent class when the member names of the class and its child subclasses are same.

2) To call the default and parameterized constructor of the parent class inside the child class.

3) Accessing the parent class methods when the child classes have overridden them.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date4 May 2019
Coding problem1

This was a Technical Cum HR round where I was first asked some basic Java related concepts and then we discussed
about my expectations from the company , learnings and growth in the forthcomig years. I would suggest be honest and
try to communicate your thoughts properly in these type of rounds to maximise your chances of getting selected.

1. Basic HR Questions

Why should we hire you ?
What are your expectations from the company?
How was your overall interview experience?
What are your strengths and weakness according to you?
Where do you see yourself in the next 5 years?

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.

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
Software Developer
3 rounds | 13 problems
Interviewed by Capita pvt ltd
870 views
0 comments
0 upvotes
Software Consultant
3 rounds | 17 problems
Interviewed by Capita pvt ltd
756 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes