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

Software Developer

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

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, OOPS, C#, .NET, Design Patterns
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.

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
Medium
Video Call
Duration60 Minutes
Interview date16 Nov 2020
Coding problem4

In this round, the interviewer asked me 2 coding questions , the first one was related to Simple Hashing and the second one was to implement Kadane's Algorithm. I coded both the solutions in the given time and at the end was also asked some questions revolving around OOPS and C#.

1. Two Sum

Easy
10m average time
90% success
0/40
Asked in companies
Chegg Inc.FacebookAmazon

You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

Note:

We cannot use the element at a given index twice.

Follow Up:

Try to do this problem in O(N) time complexity. 
Problem approach

Approach :

1) We can store the frequency of every element in the array in a hashmap.

2) We will loop over every index i, and check the frequency of (Target - ARR[i]) is the hashmap : 

2.1) If (Target - ARR[i]) is equal to ARR[i], we will check if frequency of ARR[i] . If it is greater than 1 then we will
decrease the frequency of ARR[i] by 2 and add a pair (ARR[i] , ARR[i]) to our answer.

2.2) Else, if the frequency of ARR[i] and Target - ARR[i] is greater than equal to 1 then we add pair (ARR[i], Target -
ARR[i]) to our answer and decrease the frequency of both by 1.

3) If no valid pairs exist, we will return [[-1,-1]].


TC : O(N) , where N = size of the array
SC : O(N)

Try solving now

2. Maximum Subarray Sum

Moderate
0/80
Asked in companies
AmazonOracleOptum

You are given an array/list ARR consisting of N integers. Your task is to find the maximum possible sum of a non-empty subarray(contagious) of this array.

Note: An array C is a subarray of array D if it can be obtained by deletion of several elements(possibly zero) from the beginning and the end of array D.

For e.g.- All the non-empty subarrays of array [1,2,3] are [1], [2], [3], [1,2], [2,3], [1,2,3].

Problem approach

Approach (Using Kadane's Algo) :

1) Declare a variable ‘maxSum’ and initialize it with ‘minimum integer’.

2) Declare a variable ‘localSum’ and initialize it with ‘0’.

3) Declare 3 counter variables as ‘start’ , ‘end’ , ‘newStart’ as 0, 0, 0.

4) Run a loop from i = 0 to N
4.1) Add a current element to ‘localSum’.

4.2) If 'localSum' is greater than 'maxSum'
Update ‘maxSum’ with 'localSum', update start with ‘newStart’ and end with loop counter ‘i’.

4.3) If 'localSum' is equal to ‘maxSum’ and the difference between ‘end’ and ‘start’ is less than the difference between ‘newStart’ and ‘i’
Update start with ‘newStart’ and end with ‘i’.

4.4) If 'localSum' is below ‘0’
Update ‘localSum’ as 0 and set ‘newStart' as ‘i’ + 1.

5) Return the part of the array starting from ‘start’ and ending at ‘end’.


TC : O(N), where N=size of the array
SC : O(N), we need a final array to store the result maximum subarray.

Try solving now

3. OOPS Question

What do you mean by data encapsulation?

Problem approach

1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in
a single unit.

2) It helps developers to follow modularity while developing software by ensuring that each object is independent of
other objects by having its own methods, attributes, and functionalities.

3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.

4. OOPS Question

What are the different ways in which a method can be Overloaded in C#?

Problem approach

Overloading means when a method has the same name but carries different values to use in a different context. Only the main() method cannot be overloaded.

In order to overload methods in C#, 

1) Change the number of parameters in a method, or
2) Change the order of parameters in a method, or
3) Use different data types for parameters

In these ways, you can overload a method multiple times.

EXAMPLE : 

public class Area {
public double area(double x) {
double area = x * x;
return area;
}
public double area(double a, double b) {
double area = a * b;
return area;
}
}


Here, the method Area is used twice. In the first declaration, one argument is used while in the second one, there were two arguments are used. Using different parameters in the same method, we were able to overload the method area().

02
Round
Medium
Video Call
Duration60 Minutes
Interview date16 Nov 2020
Coding problem8

This round was preety much mixed and had questions from LINQ , .NET framework, DBMS, OOPS and Design Patterns.

1. LINQ Question

What is LINQ and what are the advantages of using LINQ in Dataset?

Problem approach

LINQ : The word LINQ is the abbreviation of the Language Integrated Query. It's a .NET framework module that connects native data querying capabilities to .net Language. It offers easy data access from in-memory objects, databases, XML documents, and many more.

The advantages of LINQ are as follows -

1) The primary purpose of using LINQ is to retrieve complex query in a dataset.

2) LINQ is used to combine the values from two different data set.

3) It is also used to fetch a unique value from the data set.

4) LINQ gives a more precise way than SQL query of querying the dataset.

5) LINQ also provides more functionality as compared with ADO.NET.

2. LINQ Question

Differentiate between LINQ and Stored Procedure.

Problem approach

Some significant differences between LINQ and Stored Procedure are as follows -

1) The stored procedure is faster than a LINQ query because they follow a proper (Expected) execution plan.

2) It is easy to avoid run time errors in SQL query than in comparison to a stored procedure.

3) LINQ uses the .NET debugger to allow debugging, which is not in case of stored procedures.

4) LINQ supports multiple databases in contrast to stored procedures.

5) Deployment of LINQ based solution is more comfortable than the deployment of a stored procedure.

3. LINQ Question

What is Expression Tree in LINQ?

Problem approach

Lambda expressions are extensively used in Expression Tree construction. An Expression Tree represents code in a tree-like format, where each node acts as an impression. Expression trees can be converted into compiled code and run it.

In, .NET framework, Expression class is used to create expression tree through the API. Expression Trees API also support assignment and some control flow expression such as conditional blocks, loops, and try-catch blocks. By using the API, we can generate expression trees that are more complex than those that can be created from lambda expressions.

4. .NET Question

What is a delegate in .NET?

Problem approach

A delegate is a .NET object which defines a method signature and it can pass a function as a parameter.

Delegate always points to a method that matches its specific signature. Users can encapsulate the reference of a method in a delegate object.

When we pass the delegate object in a program, it will call the referenced method. To create a custom event in a class, we can make use of delegate.

5. .NET Question

What is MIME in .NET?

Problem approach

MIME stands for Multipurpose Internet Mail Extensions. It is the extension of the e-mail protocol which lets users use the protocol to exchange files over emails easily.

Servers insert the MIME header at the beginning of the web transmission to denote that it is a MIME transaction.

Then the clients use this header to select an appropriate ‘player’ for the type of data that the header indicates. Some of these players are built into the web browser.

6. DBMS Question

Difference between Trigger and Procedure

Problem approach

Triggers : 

1) A Trigger is implicitly invoked whenever any event such as INSERT, DELETE, UPDATE occurs in a TABLE.
2) Only nesting of triggers can be achieved in a table. We cannot define/call a trigger inside another trigger.
3) In a database, syntax to define a trigger: CREATE TRIGGER TRIGGER_NAME.
4) Transaction statements such as COMMIT, ROLLBACK, SAVEPOINT are not allowed in triggers.
5) Triggers are used to maintain referencial integrity by keeping a record of activities performed on the table.


Procedures : 

1) A Procedure is explicitly called by user/application using statements or commands such as exec, EXECUTE, or simply procedure_name.
2) We can define/call procedures inside another procedure.
3) In a database, syntax to define a procedure: CREATE PROCEDURE PROCEDURE_NAME.
4) All transaction statements such as COMMIT, ROLLBACK are allowed in procedures.
5) Procedures are used to perform tasks defined or specified by the users.

7. OOPS Question

What is Abstraction and Data Encapsulation?

Problem approach

Abstraction : 
1) If you are a user, and you have a problem statement, you don't want to know how the components of the software work, or how it's made. You only want to know how the software solves your problem. 

2) Abstraction is the method of hiding unnecessary details from the necessary ones. It is one of the main features of OOPs. 

3) For example, consider a car. You only need to know how to run a car, and not how the wires are connected inside it. This is obtained using Abstraction.



Encapsulation :
1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in a single unit.

2) It helps developers to follow modularity while developing software by ensuring that each object is independent of other objects by having its own methods, attributes, and functionalities.

3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.

8. Design Pattern Question

What are the types of design patterns in Java?

Problem approach

There are three types of design patterns. They are : 

1) Creational Patterns: These patterns provide freedom of choice between creating objects by hiding the logic. The
objects constructed are decoupled from the implemented system. Some of the examples of creational patterns are -
Factory design pattern, Builder design, Prototype design, Singleton design, Abstract Factory design.

2) Structural Patterns: These patterns help in defining how the structures of classes and objects should be like for
defining the composition between classes, interfaces and objects. Some of the examples of structural patterns are -
Adaptor design, Facade design, Decorator design, proxy design etc.

3) Behavioural Patterns: These patterns help to define how the objects should communicate and interact with one
another. Some of the examples of behavioural patterns are - Command pattern, Iterator pattern, Observer pattern,
Strategy pattern, etc.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date16 Nov 2020
Coding problem1

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

Tell me something not there in your resume.

Problem approach

If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from
your resume.

Example :

Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me
unique from others.

Ability to handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more
efficient.


Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great
deal of energy if hired.

These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is
nothing to worry about if you have a good command over your communication skills and you are able to propagate
your thoughts well to the interviewer.

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 Consultant
3 rounds | 17 problems
Interviewed by Capita pvt ltd
808 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
Companies with similar interview experiences
company logo
Software Developer
5 rounds | 14 problems
Interviewed by Microsoft
3931 views
1 comments
0 upvotes
company logo
Software Developer
6 rounds | 12 problems
Interviewed by SAP Labs
2806 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 3 problems
Interviewed by Amazon
1134 views
0 comments
0 upvotes