Summary of "5th July 😎 #Virtusa Coding Questions | Virtusa Online Assessment Test 2025 | Tekno UF"
Summary of the Video: "5th July 😎 #Virtusa Coding Questions | Virtusa Online Assessment Test 2025 | Tekno UF"
This video provides a detailed explanation and walkthrough of a Virtusa online assessment coding question from 5th July, along with an overview of the exam structure and preparation tips.
Main Ideas and Concepts
- Overview of Virtusa Online Assessment Test Structure:
- Total questions: 98
- Sections include:
- Analytical reasoning
- Logical reasoning
- Verbal ability (including essay writing)
- Technical questions covering:
- Data Structures and Algorithms (DSA)
- Operating Systems
- Networking
- Cloud concepts
- There is a 10-minute break after the technical section.
- Coding round details:
- 3 questions in 90 minutes (basic coding round)
- Followed by a "power coding" round with 2 questions in 60 minutes
- Coding language depends on the candidate’s selection (Java or others)
- Focus on Technical Questions:
- Coding Question Explained: Smallest Missing Even Number
- Problem Statement:
Given an integer array
Aof lengthn, find the smallest missing even number. If all even numbers up to the maximum even number in the array are present, return the next even number after the largest even number. - Examples:
- Input:
[2, 4, 6]→ Output:8(no missing even number, so return next even number) - Input:
[2, 6]→ Output:4(4 is missing) - Input:
[2, 6, 10]→ Output:4(4 is the smallest missing even number) - Input:
[2, 4, 6, 8, 12]→ Output:10(10 is missing) - Input:
[2, 4, 6, 8, 10]→ Output:12(all even numbers present, return next even number)
- Input:
- Problem Statement:
- Input and Output Specifications:
- Input:
- Integer
nrepresenting the size of the array - Integer array
Acontaining positive integers
- Integer
- Output:
- Integer representing the smallest missing even number as per the problem statement
- Input:
- Solution Approach and Methodology:
- Step-by-step approach:
- Take input size
nand arrayA. - Use a
HashSet<Integer>to store unique even numbers from the array. - Identify the maximum even number in the set.
- Iterate from 2 to
max_even + 2in steps of 2 (even numbers). - For each even number, check if it is present in the set.
- Return the first even number that is missing.
- If none are missing, return the next even number after the maximum.
- Take input size
- Why use HashSet?
- To efficiently check presence/absence of numbers (O(1) average lookup).
- Ensures unique values are stored.
- Step-by-step approach:
- Code Implementation Highlights:
- Use of
Scannerclass for input. - Static method for finding the smallest missing even number (static used to save memory and allow calling without object instantiation).
- Enhanced for-loops for iterating over arrays and sets.
- Use of
Math.max()to find the maximum even number. - Checking evenness by using modulus operator (
num % 2 == 0). - Iteration and conditional checks explained clearly.
- Use of
- Additional Notes:
- Encouragement to comment answers and request more interview questions.
- Promotion of paid study materials available on techn like doc.io/technoskeep.
- The instructor apologizes for low voice due to late-night recording.
- Request for feedback and subscriptions to the channel.
Detailed Methodology / Instructions to Solve the Coding Question
- Input:
- Read integer
n(size of array). - Read array
Aof sizen.
- Read integer
- Process:
- Initialize a
HashSet<Integer>calledevenNumbers. - Loop through each element
numin arrayA:- If
numis even (num % 2 == 0), addnumtoevenNumbers.
- If
- Initialize
maxEvenas 0. - Loop through
evenNumbersto find the maximum even number usingMath.max. - ...
- Initialize a
Category
Educational