Virtusa interview experience Real time questions & tips from candidates to crack your interview

Associate Software Engineer

Virtusa
upvote
share-icon
3 rounds | 16 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, System Design, Aptitude, 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: 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
Video Call
Duration60 Minutes
Interview date27 Jul 2021
Coding problem7

This round had 1 coding question related to stacks and recursion which was followed by an SQL question. After that , I was asked some questions related to Core Java and DBMS.

1. Reverse Stack Using Recursion

Easy
21m average time
80% success
0/40
Asked in companies
AmazonOracleRazorpay

Reverse a given stack of 'N' integers using recursion. You are required to make changes in the input parameter itself.


Note: You are not allowed to use any extra space other than the internal stack space used due to recursion.


Example:
Input: [1,2,3,4,5] 
Output: [5,4,3,2,1]

add image

Problem approach

Approach : We will be using two recursive methods - 

1) ReverseStack(stack)
i) If the stack is empty, then return
ii) Pop the top element from the stack as top
iii) Reverse the remaining elements in the stack, call reverseStack(stack) method
iv) Insert the top element to the bottom of the stack, call InsertAtBottom(stack, top) method


2) InsertAtBottom(stack, ele)
i) If the stack is empty, push ele to stack, return
ii) Pop the top element from the stack as top
iii) Insert the ele to the bottom of the stack, call InsertAtBottom(stack, ele) method
iv) Push top to the stack.


TC : O(N^2), where N = total number of elements in the given stack
SC : O(N)

Try solving now

2. SQL Question

Combine Two Tables

Problem approach

Approach : Since the PersonId in table Address is the foreign key of table Person, we can join this two table to get the address information of a person. Considering there might not be an address information for every person, we should use outer join instead of the default inner join.

Query : 

select FirstName, LastName, City, State
from Person left join Address
on Person.PersonId = Address.PersonId ;

3. Java Question

What is the difference between JDK, JRE, and JVM?

Problem approach

JVM : 
1) JVM is an acronym for Java Virtual Machine; it is an abstract machine which provides the runtime environment in which Java bytecode can be executed. 

2) It is a specification which specifies the working of Java Virtual Machine. Its implementation has been provided by Oracle and other companies. Its implementation is known as JRE.

3) JVMs are available for many hardware and software platforms (so JVM is platform dependent). It is a runtime instance which is created when we run the Java class. 

4) There are three notions of the JVM: specification, implementation, and instance.



JRE : 
1) JRE stands for Java Runtime Environment. It is the implementation of JVM. 

2) The Java Runtime Environment is a set of software tools which are used for developing Java applications. 

3) It is used to provide the runtime environment. It is the implementation of JVM. 

4) It physically exists. It contains a set of libraries + other files that JVM uses at runtime.



JDK : 
1) JDK is an acronym for Java Development Kit. It is a software development environment which is used to develop Java applications and applets. 

2) It physically exists.

3) It contains JRE + development tools. 

4) JDK is an implementation of any one of the below given Java Platforms released by Oracle Corporation:
Standard Edition Java Platform
Enterprise Edition Java Platform
Micro Edition Java Platform

4. Java 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.

5. DBMS Question

What are the three levels of data abstraction?

Problem approach

Following are three levels of data abstraction:

Physical level : It is the lowest level of abstraction. It describes how data are stored.

Logical level : It is the next higher level of abstraction. It describes what data are stored in the database and what the relationship among those data is.

View level : It is the highest level of data abstraction. It describes only part of the entire database.

For example- User interacts with the system using the GUI and fill the required details, but the user doesn't have any idea how the data is being used. So, the abstraction level is entirely high in VIEW LEVEL.

Then, the next level is for PROGRAMMERS as in this level the fields and records are visible and the programmers have the knowledge of this layer. So, the level of abstraction here is a little low in VIEW LEVEL.

And lastly, physical level in which storage blocks are described.

6. 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.

7. DBMS Question

What is Cursor? How to use a Cursor?

Problem approach

A database cursor is a control structure that allows for the traversal of records in a database. Cursors, in addition, facilitates processing after traversal, such as retrieval, addition, and deletion of database records. They can be viewed as a pointer to one row in a set of rows.

Working with SQL Cursor :

1) DECLARE a cursor after any variable declaration. The cursor declaration must always be associated with a SELECT Statement.
2) Open cursor to initialize the result set. The OPEN statement must be called before fetching rows from the result set.
3) FETCH statement to retrieve and move to the next row in the result set.
4) Call the CLOSE statement to deactivate the cursor.
5) Finally use the DEALLOCATE statement to delete the cursor definition and release the associated resources.

02
Round
Medium
Video Call
Duration50 Minutes
Interview date27 Jul 2021
Coding problem7

In this round, the interviewer asked questions related to my projects. Since I did some web development projects , the interviewer grilled me on concepts related to HTML , CSS and JavaScript.

1. JavaScript Question

What is the difference between .call() and .apply()?

Problem approach

The function .call() and .apply() are very similar in their usage except a little difference. .call() is used when the number of the function’s arguments are known to the programmer, as they have to be mentioned as arguments in the call statement. On the other hand, .apply() is used when the number is not known. The function .apply() expects the argument to be an array.

2. JavaScript Question

How do you compare Object and Map

Problem approach

Objects are similar to Maps in that both let you set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key. Due to this reason, Objects have been used as Maps historically. But there are important differences that make using a Map preferable in certain cases.

1) The keys of an Object are Strings and Symbols, whereas they can be any value for a Map, including functions, objects, and any primitive.

2) The keys in Map are ordered while keys added to Object are not. Thus, when iterating over it, a Map object returns keys in order of insertion.

3) You can get the size of a Map easily with the size property, while the number of properties in an Object must be determined manually.

4) A Map is an iterable and can thus be directly iterated, whereas iterating over an Object requires obtaining its keys in some fashion and iterating over them.

5) An Object has a prototype, so there are default keys in the map that could collide with your keys if you're not careful. As of ES5 this can be bypassed by using map = Object.create(null), but this is seldom done.

6) A Map may perform better in scenarios involving frequent addition and removal of key pairs.

3. JavaScript Question

What is the difference between let and var

Problem approach

var : 
1) It is been available from the beginning of JavaScript
2) It has function scope
3) Variables will be hoisted

let :
1) Introduced as part of ES6
2) It has block scope
3) Hoisted but not initialized 

Let's take an example to see the difference,

function userDetails(username) {
if(username) {
console.log(salary); // undefined due to hoisting
console.log(age); // ReferenceError: Cannot access 'age' before initialization
let age = 35;
var salary = 19000;
}
console.log(salary); //10000 (accessible to due function scope)
console.log(age); //error: age is not defined(due to block scope)
}
userDetails('Ram');

4. HTML Question

What are the various formatting tags in HTML?

Problem approach

HTML has various formatting tags : 

- makes text bold
- makes text italic
- makes text italic but with added semantics importance
- increases the font size of the text by one unit
- decreases the font size of the text by one unit
- makes the text a subscript
- makes the text a superscript
- displays as strike out text
- marks the text as important
- highlights the text
- displays as added text

5. HTML Question

What are some of the advantages of HTML5 over its previous versions?

Problem approach

Some advantages of HTML5 are:-

1) It has Multimedia Support.
2) It has the capabilities to store offline data using SQL databases and application cache.
3) Javascript can be run in the background.
4) HTML5 also allows users to draw various shapes like rectangles, circles, triangles, etc.
5) Included new Semantic tags and form control tags.

6. CSS Question

Difference between reset vs normalize CSS?. How do they differ?

Problem approach

Reset CSS: CSS resets aim to remove all built-in browser styling. For example margins, paddings, font-sizes of all elements are reset to be the same. 

Normalize CSS: Normalize CSS aims to make built-in browser styling consistent across browsers. It also corrects bugs for common browser dependencies.

7. CSS Question

What is a z-index, how does it function?

Problem approach

z-index is used for specifying the vertical stacking of the overlapping elements that occur at the time of its positioning. It specifies the vertical stack order of the elements positioned that helps to define how the display of elements should happen in cases of overlapping.

The default value of this property is 0 and can be either positive or negative. Apart from 0, the values of the z-index can be :

1) Auto: The stack order will be set equal to the parent.

2) Number: The number can be positive or negative. It defines the stack order.

3) Initial: The default value of 0 is set to the property.

4) Inherit: The properties are inherited from the parent.

The elements having a lesser value of z-index is stacked lower than the ones with a higher z-index.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date27 Jul 2021
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

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.

2. 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.

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 the output of print(type("Python"))?

Choose another skill to practice
Similar interview experiences
Associate Software Engineer
3 rounds | 14 problems
Interviewed by Virtusa
1226 views
0 comments
0 upvotes
Associate Software Engineer
3 rounds | 4 problems
Interviewed by Virtusa
1260 views
1 comments
0 upvotes
Analyst
3 rounds | 3 problems
Interviewed by Virtusa
1095 views
0 comments
0 upvotes
Associate Software Engineer
2 rounds | 4 problems
Interviewed by Virtusa
1108 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Software Engineer
2 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
5025 views
1 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 5 problems
Interviewed by Tata Consultancy Services (TCS)
3225 views
2 comments
0 upvotes
company logo
Associate Software Engineer
4 rounds | 5 problems
Interviewed by Accenture
3802 views
0 comments
0 upvotes