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

  1. Overview of Virtusa Online Assessment Test Structure:
    • Total questions: 98
    • Sections include:
    • 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)
  2. Focus on Technical Questions:
    • Technical questions carry significant weight in the assessment.
    • Candidates should prepare thoroughly for technical and coding sections.
    • Some questions are based on the Java HashSet class and its properties.
  3. Coding Question Explained: Smallest Missing Even Number
    • Problem Statement:

      Given an integer array A of length n, 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)
  4. Input and Output Specifications:
    • Input:
      • Integer n representing the size of the array
      • Integer array A containing positive integers
    • Output:
      • Integer representing the smallest missing even number as per the problem statement
  5. Solution Approach and Methodology:
    • Step-by-step approach:
      • Take input size n and array A.
      • 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 + 2 in 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.
    • Why use HashSet?
      • To efficiently check presence/absence of numbers (O(1) average lookup).
      • Ensures unique values are stored.
  6. Code Implementation Highlights:
    • Use of Scanner class 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.
  7. 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

Category ?

Educational

Share this summary

Video