Add office photos
Virtusa Consulting Services logo
Employer?
Claim Account for FREE

Virtusa Consulting Services

3.8
based on 4.8k Reviews
Filter interviews by
Associate Software Engineer
Fresher
Experienced
Clear (1)

20+ Virtusa Consulting Services Associate Software Engineer Interview Questions and Answers

Updated 3 Sep 2024

Q1. Reverse Stack with Recursion

Reverse a given stack of integers using recursion. You must accomplish this without utilizing extra space beyond the internal stack space used by recursion. Additionally, you must r...read more

Ans.

Reverse a given stack of integers using recursion without using extra space or loop constructs.

  • Use recursion to pop all elements from the original stack and store them in function call stack.

  • Once the stack is empty, push the elements back in reverse order using recursion.

  • Ensure to handle base cases like empty stack or single element stack.

  • Example: If the input stack is [1, 2, 3], after reversal it should be [3, 2, 1].

Add your answer
right arrow

Q2. Word Occurrence Counting

Given a string 'S' of words, the goal is to determine the frequency of each word in the string. Consider a word as a sequence of one or more non-space characters. The string can have mu...read more

Ans.

Count the frequency of each word in a given string.

  • Split the input string by spaces to get individual words.

  • Use a hashmap to store the frequency of each word.

  • Iterate through the words and update the hashmap accordingly.

  • Print the unique words and their frequencies from the hashmap.

Add your answer
right arrow
Virtusa Consulting Services Associate Software Engineer Interview Questions and Answers for Freshers
illustration image
Q3. ...read more

Number and Digits Problem Statement

You are provided with a positive integer N. Your task is to identify all numbers such that the sum of the number and its digits equals N.

Example:

Input:
N = 21
Output:
[15]
Ans.

Identify numbers where sum of number and its digits equals given integer N.

  • Iterate through numbers from 1 to N and check if sum of number and its digits equals N

  • Use a helper function to calculate sum of digits for a given number

  • Return the numbers that satisfy the condition in increasing order, else return -1

Add your answer
right arrow
Q4. What are the three levels of data abstraction in a Database Management System?
Ans.

The three levels of data abstraction in a Database Management System are Physical Level, Logical Level, and View Level.

  • Physical Level: Deals with how data is stored on the storage medium. It includes details like data structures, file organization, and indexing.

  • Logical Level: Focuses on how data is viewed by users. It hides the physical storage details and presents a logical view of the database.

  • View Level: Represents a subset of the database to specific users. It provides a ...read more

Add your answer
right arrow
Discover Virtusa Consulting Services interview dos and don'ts from real experiences
Q5. How do you combine two tables in SQL?
Ans.

To combine two tables in SQL, you can use the JOIN clause to merge rows based on a related column.

  • Use the JOIN clause to specify the columns from each table that are used to match up rows.

  • Types of JOINs include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.

  • Example: SELECT * FROM table1 JOIN table2 ON table1.column = table2.column;

Add your answer
right arrow
Q6. What is the difference between an abstract class and an interface in Java?
Ans.

Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.

  • Abstract class can have constructors, member variables, and methods with implementation.

  • Interface can only have abstract methods and constants.

  • A class can implement multiple interfaces but can only extend one abstract class.

  • Example: Abstract class - Animal with abstract method 'eat', Interface - Flyable with method 'fly'.

Add your answer
right arrow
Are these interview questions helpful?
Q7. What is meant by normalization and denormalization?
Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. Denormalization is the opposite process.

  • Normalization involves breaking down a table into smaller tables and defining relationships between them to reduce redundancy.

  • Denormalization involves combining tables to reduce the number of joins needed for queries, sacrificing some normalization benefits for performance.

  • Normalization helps in maintaining data integrity and r...read more

Add your answer
right arrow
Q8. How do you compare an Object and a Map in JavaScript?
Ans.

Objects are key-value pairs with methods, while Maps are collections of key-value pairs with ordered keys and better performance.

  • Objects are unordered collections of key-value pairs, while Maps maintain the order of insertion.

  • Maps allow any type of key, while Objects only allow strings and symbols as keys.

  • Maps have better performance for scenarios involving frequent additions and removals of key-value pairs.

  • Objects have prototype chain and methods like hasOwnProperty(), while...read more

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop
Q9. What are some advantages of HTML5 over its previous versions?
Ans.

HTML5 offers several advantages over its previous versions.

  • Improved support for multimedia elements such as audio and video tags

  • Enhanced support for canvas and SVG for better graphics rendering

  • Introduction of new semantic elements like <header>, <footer>, <nav>, <article> for better structure and accessibility

  • Built-in support for offline storage using local storage and session storage

  • Better support for drag and drop functionality and geolocation services

Add your answer
right arrow
Q10. What are the various formatting tags in HTML?
Ans.

Various formatting tags in HTML include <b>, <i>, <u>, <strong>, <em>, <sub>, <sup>, <strike>, <br>, <hr>, <pre>, <blockquote>, <code>, <kbd>, <samp>, <var>, <cite>, <abbr>, <address>, <small>, <big>, <font>, <center>, <s>, <del>, <ins>, <mark>, <time>, <progress>, <meter>, <q>, <dfn>, <span>, <div>, <section>, <article>, <aside>, <nav>, <header>, <footer>, <main>, <figure>, <figcaption>, <details>, <summary>, <dialog>, <menu>, <menuitem>, <legend>, <fieldset>, <label>, <butt...read more

Add your answer
right arrow
Q11. What is the difference between 'let' and 'var' in JavaScript?
Ans.

let is block-scoped while var is function-scoped in JavaScript.

  • let is block-scoped, meaning it is only accessible within the block it is declared in.

  • var is function-scoped, meaning it is accessible throughout the function it is declared in.

  • Using let can help prevent variable hoisting issues.

  • let allows for better control over variable scope and reduces the risk of unintended variable redeclarations.

Add your answer
right arrow

Q12. Is a string mutable/immutable with an example

Ans.

A string can be both mutable and immutable depending on the programming language.

  • In languages like Java and Python, strings are immutable.

  • In languages like C++ and C#, strings are mutable.

  • Immutable strings cannot be modified once created, while mutable strings can be modified.

  • Example of immutable string: 'hello world'.replace('o', '0') returns 'hell0 w0rld'.

  • Example of mutable string: string s = 'hello'; s[0] = 'j'; s now becomes 'jello'.

Add your answer
right arrow

Q13. String is immutable. Array and arraylist differences

Ans.

String is immutable, array and arraylist are mutable data structures.

  • String is immutable, meaning its value cannot be changed once it is created.

  • Array is a fixed-size data structure that stores elements of the same data type.

  • ArrayList is a dynamic array that can grow or shrink in size as needed.

  • Example: String str = "hello"; char[] arr = {'h', 'e', 'l', 'l', 'o'}; ArrayList list = new ArrayList();

Add your answer
right arrow

Q14. What is Java OOP's concept

Ans.

Java OOP's concept is a programming paradigm that uses objects to design applications and programs.

  • Java OOP's concept is based on four main principles: encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation is the process of hiding the implementation details of an object from the outside world.

  • Inheritance allows a class to inherit properties and methods from another class.

  • Polymorphism allows objects to take on multiple forms or behaviors.

  • Abstraction is the pr...read more

Add your answer
right arrow

Q15. A program on recursion.

Ans.

Recursion is a programming technique where a function calls itself to solve a problem.

  • Recursion involves a base case and a recursive case

  • Recursion can be used to solve problems like factorial, Fibonacci sequence, and binary search

  • Recursion can be less efficient than iterative solutions for some problems

Add your answer
right arrow

Q16. OOPS concept with examples

Ans.

OOPS is a programming paradigm based on the concept of objects.

  • OOPS stands for Object-Oriented Programming System

  • It focuses on creating objects that contain both data and functions

  • Encapsulation, Inheritance, and Polymorphism are the three main pillars of OOPS

  • Example: A car is an object that has properties like color, model, and functions like start, stop, and accelerate

Add your answer
right arrow

Q17. Explain Marker Interface.

Ans.

Marker interface is an empty interface used to mark classes for special treatment.

  • Marker interface has no methods or fields.

  • It is used to provide metadata to the JVM or other tools.

  • Examples include Serializable interface in Java.

Add your answer
right arrow

Q18. Explain OOPs concepts.

Ans.

OOPs concepts are the principles of Object-Oriented Programming, including encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit (object).

  • Inheritance: Allowing a class to inherit properties and behavior from another class.

  • Polymorphism: The ability for objects of different classes to respond to the same method call.

  • Abstraction: Hiding the complex implementation details and showing only the...read more

Add your answer
right arrow

Q19. Explain synchronization.

Ans.

Synchronization is the coordination of multiple processes or threads to ensure they access shared resources in a controlled manner.

  • Synchronization is important in multi-threaded programming to prevent race conditions and ensure data consistency.

  • Common synchronization mechanisms include locks, semaphores, and monitors.

  • For example, using a mutex lock to protect a critical section of code from being accessed by multiple threads simultaneously.

Add your answer
right arrow

Q20. Explain Normalization.

Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalization is used to eliminate data redundancy by breaking up tables into smaller, related tables.

  • It helps in reducing data anomalies such as update, insert, and delete anomalies.

  • Normalization is achieved through a series of stages called normal forms, such as 1NF, 2NF, 3NF, and BCNF.

  • For example, in a database of students and courses, instead of storing student de...read more

Add your answer
right arrow

Q21. Explain Array and ArrayList

Ans.

Array is a fixed-size collection of elements of the same data type, while ArrayList is a dynamic-size collection of objects.

  • Array is a static data structure with a fixed size, while ArrayList is a dynamic data structure that can grow or shrink in size.

  • Arrays can only store elements of the same data type, while ArrayList can store objects of different data types.

  • Arrays are accessed using index positions, while ArrayList provides methods for adding, removing, and accessing elem...read more

Add your answer
right arrow

Q22. Deadlock scenario in thread

Ans.

Deadlock scenario in thread occurs when two or more threads are waiting for each other to release resources, causing a standstill.

  • Two threads each holding a resource needed by the other thread

  • No thread can proceed until the other releases the resource

  • Can be avoided by careful resource allocation and ordering

Add your answer
right arrow

Q23. Maximum questios from java

Ans.

The question is asking for the maximum number of questions that can be asked from Java.

  • Java is a versatile programming language with a wide range of topics that can be covered in questions.

  • Topics can include data types, control structures, object-oriented programming, exception handling, multithreading, collections, etc.

  • Examples of questions could be related to inheritance, polymorphism, encapsulation, abstraction, interfaces, etc.

Add your answer
right arrow

Q24. Multithreading in Java

Ans.

Multithreading in Java allows multiple threads to execute concurrently, improving performance and responsiveness.

  • Multithreading is achieved in Java by extending the Thread class or implementing the Runnable interface.

  • Threads can be started using the start() method and controlled using methods like join(), sleep(), and interrupt().

  • Synchronization is important to prevent race conditions and ensure thread safety, which can be achieved using synchronized blocks or methods.

  • Java pr...read more

Add your answer
right arrow

Q25. Array sort program

Ans.

Implement a program to sort an array of strings

  • Use a sorting algorithm like bubble sort, selection sort, or quicksort

  • Ensure the sorting algorithm is implemented correctly for strings

  • Consider using built-in sorting functions in programming languages like sort() in Python

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Virtusa Consulting Services Associate Software Engineer

based on 16 interviews
4 Interview rounds
Coding Test Round
Technical Round
HR Round - 1
HR Round - 2
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Associate Software Engineer Interview Questions from Similar Companies

View all
Recently Viewed
INTERVIEWS
Hexaware Technologies
10 top interview questions
CAMPUS PLACEMENT
KIIT University, Bhuvaneshwar
INTERVIEWS
Accenture
100 top interview questions
INTERVIEWS
Accenture
No Interviews
INTERVIEWS
Accenture
No Interviews
INTERVIEWS
Cognizant
10 top interview questions
INTERVIEWS
AU Small Finance Bank
No Interviews
INTERVIEWS
AU Small Finance Bank
No Interviews
INTERVIEWS
Genpact
No Interviews
INTERVIEWS
Accenture
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter