Virtusa Coding Questions with Answers

Virtusa Coding Questions with Solutions

Preparing Virtusa coding questions for Virtusa Online Test can be a game changer in clearing the technical stages of the hiring process. Whether you’re aiming for the Coder or Power Coder role, understanding the type of questions asked and practicing with the right approach is essential.

In this article, we’ve compiled some of the most commonly asked Sample Virtusa coding questions, along with detailed answers and explanations to help you sharpen your problem solving skills and improve your chances of selection. 

virtusa coding questions with solutions

Virtusa Recruitment Process Details....

CriteriaCoderPower Coder
PurposeStandard coding profile for general technical roles.Advanced coding profile for top performers or specialized roles.
No. of Coding Questions4 Questions3 Questions
Difficulty LevelModerateHard
Time Limit50 Minutes80 Minutes
Topics CoveredArrays, Strings, Recursion, Sorting, Searching, etc.Trees, Graphs, Dynamic Programming, Advanced Algorithms, etc.
Evaluation CriteriaLogic, Correctness an d Basic OptimizationEfficient Algorithm Design, Optimization and Edge Case Handling
Who Should Apply?Freshers with good coding fundamentalsCandidates aiming for higher packages or competitive tech roles
SalaryRs. 5 LPARs. 6.5 LPA

From here, you will get sample Virtusa Coding Questions with Solution to practice properly including Advanced Data Structures and Algorithms Concepts…..

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Sample Virtusa Coding Questions and Answers

Problem 1. Build Pattern:

Problem Statement: Ram has been given a task by his friend to built the trapezium, but ram mocked him to give him such easy problem.

So to make problem hard , his friend apply some conditions on the problems :

  • Length should be provided by the user
  • Trapezium should be filled with # and –
  • Trapezium should be half cut
  • Last line of trapezium should be only filled with –

Input: 5

Output:
####-####
###—###
##—–##
#——-#
———

Solution:

Problem 2: Minimum Sum Game

Problem Statement: Ram is a boy who is very interested in playing new games, so his mother took him to a puzzle game and asked him to solve it.

His mother gave some instructions to solve the puzzle game.

  • Now he has to follow all the given instructions while solving the game. His mother explained the step by step rule of the game and told that first you have to take n elements, after that you have to sum the digits of that n taken numbers.
  • After adding the digits of the taken number, He has to check that the sum of which digit numbers is minimum.
  • Now Ram has to find the minimum sum of digits of the number which he had taken in the beginning of the game.

Write a proper algorithmic code to solve that puzzle game.

Constraints :
1<=n<= 105

Input:
4 = number of elements
21 2 30 33 elements

Output:
2

Problem 3: Finding Sequence

Problem Statement: On Monday morning,the principal of a school in Noida thought that let’s do something different with the children today.

  • So the principal called different students to the assembly hall and formed a group of students from different classes of his school to explain to them the task they want to do today.
  • Now the principal explained to them that all the people you have gathered here are a group.
  • So the task is that all you have to do is that all the people who are in this group, you have to tell your roll number.
  • After collecting the roll numbers, you have to make a line according to the roll numbers in the ascending order.

And to check how many consecutive sub sequences are being formed in the line that is being formed according to these roll numbers?

  1. And Finally the main task is that we have to see, out of the consecutive sub-sequences that are being made according to the roll number, what is the maximum possible length of the consecutive sequence of n roll no. of students taken in the beginning ?
  2. Definition of consecutive sequence: Numbers that follow each other continuously in the order from smallest to largest are called consecutive numbers.

Constraints :

  • 0 <= nums.length <= 10^5
  • -10^9 <= nums[i] <= 10^9

Input:

  • 6 = number of elements
  • [100,4,200,1,3,2] = elements

Output:
4

Problem 4: Confused String

Problem Statement: Aditya and Mohan are two friends. Aditya said to Mohan, let’s do your brain test today and check whether you get confused or not.

To test Mohan’s brain, Aditya gives him two strings, a string S1 and a string S2.

Here string S1 = coaching and string S2 = coding

While instructing Mohan, Aditya said that the letters of both the strings are in lowercase. Now Mohan’s curiosity was increasing, So he asked Aditya what he has to do with these two strings.

Aditya instructs Mohan:

  • That he has to provide a solution to find the minimum number of characters that need to be appended at the end of the first string, so the second string becomes a subsequence of the first string.
  • All the letters of the second string have to be compared with the first string in order to confirm/prove that first string is a subsequence of the second string.
  • Now Mohan has to give the algorithmic solution to pass this brain test.

Definition of subsequence: Subsequence is a string that can be derived from another string by deleting some or no characters without changing the order of the remaining characters.

Constraints:

  • 1 <= s.length <= 10^5
  • String1 and string2 consist of only lowercase english letters

Input:
String 1 : coaching
String 2 : coding

Output:
4

Problem 5: Am I Panagram?

Problem Statement: Aman has given a sentence with a meaning, his task is to check whether the given sentence is panagram or not. Your task is to write an algorithmic code to help aman.
(Panagram is the sentence which complete all the english alphabet at least once)

Input:
6
abc defghu ijklmnbop qrstuvw xyy yz

Output:
True

These were some Sample Virtusa Coding Questions and Answers, go through them properly and prepare effectively.

If you want to prepare questions like these for Virtusa Coding Round, do checkout our Coding Dashboard.

FAQ's related Virtusa Power Coding Challenge

Answer:

The Virtusa recruitment process mainly includes 4 rounds:

Round 1: Online Assessment (Aptitude, Logical Reasoning, Verbal, Pseudocode, CS Fundamentals and Coding)

Round 2: Technical Interview

Round 3: Group Discussion or Managerial Round

Round 4: HR Interview

Answer:

  • Coder Profile: Includes 4 moderate-level coding questions to be solved in 50 minutes.
  • Power Coder Profile: Includes 3 high difficulty coding questions with 80 minutes to solve. It is designed for candidates aiming for advanced roles or higher packages.

Answer:

The Virtusa assessment includes the following sections:

  1. Quantitative Aptitude and Logical Reasoning
  2. Verbal Ability
  3. Pseudocode and Programming Fundamentals
  4. Computer Science Fundamentals (OS, DBMS, Data Structures)
  5. Coding (for Coder/Power Coder tracks)

Answer:

No. While Virtusa hires extensively through campus placements, it also conducts off-campus drives and open hiring challenges like Talent Titan or Power Programmer Challenges through platforms like HirePro, TalentTitan, and Superset.

 

Answer:

To be eligible for Virtusa On campus hiring, candidates must meet the following criteria:

  1. Must be from the B.E./B.Tech (CSE, IT, ECE, EEE, EIE) or MCA/M.Tech background.
  2. Should belong to the 2025 passing out batch.
  3. Must have 60% or above in 10th, 12th, and graduation (or equivalent CGPA).
  4. Should not have more than 1 active backlog at the time of applying.
  5. Must not have a gap of more than 1 year in education.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription