GATE DA
    Test Series
    Verified Solutions Included

    Numerical Computation & Estimation, Programming Fundamentals, Vector Spaces… Test for GATE DA: 32 Questions with Solutions & Analysis

    Attempt the Numerical Computation & Estimation, Programming Fundamentals, Vector Spaces… test for GATE DA: 32 exam-level questions, detailed solutions and per

    32 Qs

    Total Questions

    48 Marks

    Total Marks

    1.44 Mins

    Duration

    Section-wise Paper Structure

    Probability and Statistics

    5 Qs

    16% of total marks

    Machine Learning

    5 Qs

    16% of total marks

    Database Management and Warehousing

    5 Qs

    16% of total marks

    Programming, Data Structures and Algorithms

    4 Qs

    13% of total marks

    Quantitative Aptitude

    3 Qs

    9% of total marks

    Linear Algebra

    3 Qs

    9% of total marks

    Spatial Aptitude

    2 Qs

    6% of total marks

    Calculus and Optimization

    2 Qs

    6% of total marks

    Artificial Intelligence

    2 Qs

    6% of total marks

    Verbal Aptitude

    1 Qs

    3% of total marks

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1
    2025 PYQ
    Level 3: Exam Standard
    There are three boxes containing white balls and black balls.

    Box-1 contains 2 black and 1 white balls.
    Box-2 contains 1 black and 2 white balls.
    Box-3 contains 3 black and 3 white balls.

    In a random experiment, one of these boxes is selected, where the probability of choosing Box-1 is , Box-2 is , and Box-3 is . A ball is drawn at random from the selected box. Given that the ball drawn is white, the probability that it is drawn from Box-2 is
    (Round off to two decimal places)
    Question 2
    2025 PYQ
    Level 3: Exam Standard
    The naive Bayes classifier is used to solve a two-class classification problem with class-labels . Suppose the prior probabilities are and . Assuming a discrete feature space with

    and for a specific feature vector . The probability of misclassifying is
    (Round off to two decimal places)
    Question 3
    2026 PYQ
    Level 3: Exam Standard
    Let



    Which of the following is the value of ?
    Question 4
    2025 PYQ
    Level 3: Exam Standard
    Consider designing a linear classifier


    on a dataset , , , . Recall that the sign function outputs if the argument is positive, and if the argument is non-positive. The parameters and are updated as per the following training algorithm:


    whenever . In other words, whenever the classifier wrongly predicts a sample from the dataset, gets updated to , and likewise gets updated to . Consider the case , . Then
    Question 5
    2024 PYQ
    Level 3: Exam Standard
    For any binary classification dataset, let and be the
    between-class and within-class scatter (covariance) matrices, respectively. The
    Fisher linear discriminant is defined by , that maximizes

    If , is non-singular and , then must satisfy which ONE
    of the following equations?
    Note: denotes the set of real numbers.
    Question 6
    2025 PYQ
    Level 3: Exam Standard
    Given data of the form , we fit a model using linear least-squares regression. The optimal value of is
    (Round off to three decimal places)
    Question 7
    2024 PYQ
    Level 3: Exam Standard
    Consider the following two tables named Raider and Team in a relational database
    maintained by a Kabaddi league. The attribute ID in table Team references the
    primary key of the Raider table, ID.

    Raider
    IDNameRaidsRaidPoints
    1Arjun200250
    2Ankush190219
    3Sunil150200
    4Reza150190
    5Pratham175220
    6Gopal193215

    The SQL query described below is executed on this database:

    SELECT *
    FROM Raider, Team
    WHERE Raider.ID=Team.ID AND City=“Jaipur” AND
    RaidPoints > 200;

    The number of rows returned by this query is ______.

    Team
    CityIDBidPoints
    Jaipur2200
    Patna3195
    Hyderabad5175
    Jaipur1250
    Patna4200
    Jaipur6200
    Question 8
    2025 PYQ
    Level 3: Exam Standard
    On a relation named Loan of a bank:

    Loan
    loan number branch name amount
    L11 Banjara Hills 90000
    L14 Kondapur 50000
    L15 SR Nagar 40000
    L22 SR Nagar 25000
    L23 Balanagar 80000
    L25 Kondapur 70000
    L19 SR Nagar 65000

    the following SQL query is executed.

    SELECT L1.loan number
    FROM Loan L1
    WHERE L1.amount > (SELECT MAX (L2.amount)
                        FROM Loan L2
                        WHERE L2.branch name = ’SR Nagar’);

    The number of rows returned by the query is (Answer in integer)
    Question 9
    2026 PYQ
    Level 3: Exam Standard
    Consider a table Employee(EmpID, TeamID), where the column EmpID (ID of an employee) is the primary key. The column TeamID denotes the team ID of the team of which the employee is a member. TeamID is a NOT NULL column.

    We want to display the size of the team (denoted as TeamSize) in which each employee is a member by using SQL. As an example, the desired output for the given Employee table is also shown in tabular form.

    Which of the following is/are correct?

    Employee
    EmpID TeamID
    1 8
    2 8
    3 8
    4 7
    5 7
    6 9

    Output
    EmpID TeamSize
    1 3
    2 3
    3 3
    4 2
    5 2
    6 1
    Question 10
    2026 PYQ
    Level 3: Exam Standard
    Consider the given Python program.

    def append_to_lst(val, lst=[]):
        lst.append(val)
        return lst
    print(append_to_lst(1))
    print(append_to_lst(2))
    print(append_to_lst(3, []))

    Which of the following is the correct output of this program?
    Question 11
    2024 PYQ
    Level 3: Exam Standard
    Consider the following Python function:
    def fun(D, s1, s2):
    if s1 < s2:
    D[s1], D[s2] = D[s2], D[s1]
    fun(D, s1+1, s2-1)
    What does this Python function fun() do? Select the ONE appropriate option
    below.
    Question 12
    2026 PYQ
    Level 3: Exam Standard
    Consider the given Python program.

    def outer():
        x = []
        def inner(val):
            x.append(val)
            return x
        return inner

    f1 = outer()
    f2 = outer()
    print(f1(10)) # Line P
    print(f1(20)) # Line Q
    print(f2(30)) # Line R
    print(f1(40)) # Line S

    Which of the following options is/are correct?
    Question 13
    2026 PYQ
    Level 3: Exam Standard
    Consider two distinct positive real numbers , with .
    Let and . The relation between and is _______.
    Question 14
    2024 PYQ
    Level 3: Exam Standard
    The sum of the following infinite series is
    Question 15
    2025 PYQ
    Level 3: Exam Standard

    If a real variable satisfies , then the value of is:

    Question 16
    2026 PYQ
    Level 3: Exam Standard
    Consider a set . Let be another set which is a subspace of with dimension two.
    Which of the following gives the area of ?
    Question 17
    2025 PYQ
    Level 3: Exam Standard

    Which of the following statements is/are correct?

    Question 18
    2024 PYQ
    Level 3: Exam Standard
    Select all choices that are subspaces of .
    Note: denotes the set of real numbers.
    Question 19
    2026 PYQ
    Level 3: Exam Standard
    The four pieces of a puzzle are shown in the figure below.
    P Q R S
    Which one of the figures labelled as P, Q, R, and S can be constructed by using each of the four pieces only once without overlaps?
    Question 20
    2025 PYQ
    Level 3: Exam Standard
    A regular dodecagon (12-sided regular polygon) is inscribed in a circle of radius cm as shown in the figure. The side of the dodecagon is cm. All the triangles (numbered 1 to 12) in the figure are used to form squares of side cm and each numbered triangle is used only once to form a square.
    The number of squares that can be formed and the number of triangles required to form each square, respectively, are:

    Note: The figure shown is representative.

    1 2 3 4 5 6 7 8 9 10
    Question 21
    2025 PYQ
    Level 3: Exam Standard

    (Round off to one decimal place)

    Question 22
    2024 PYQ
    Level 3: Exam Standard
    Evaluate the following limit:
    Question 23
    2024 PYQ
    Level 3: Exam Standard
    Let
    and
    be two admissible heuristics used in
    search.
    Which ONE of the following expressions is always an admissible heuristic?
    Question 24
    2025 PYQ
    Level 3: Exam Standard
    The state graph shows the action cost along the edges and the heuristic function associated with each state.

    S A E B C D G 4 1 2 2 2 2 3 3 h=2 h=2 h=6 h=2 h=0 h=6
    Suppose algorithm is applied on this state graph using priority queue to store the frontier. In what sequence are the nodes expanded?
    Question 25
    2025 PYQ
    Level 3: Exam Standard
    We __________ tennis in the lawn when it suddenly started to rain.

    Select the most appropriate option to complete the above sentence.

    Unlock All 32 Questions in Real Examination Mode

    Practice with the authentic timer, on-screen calculator, instant percentile ranking, and section-wise analytics.

    More GATE DA Test Series

    Free preview ends here

    Login to view the complete test and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Numerical Computation & Estimation, Programming Fundamentals, Vector Spaces… Test for GATE DA: 32 Questions with Solutions & Analysis

    Attempt the Numerical Computation & Estimation, Programming Fundamentals, Vector Spaces… test for GATE DA: 32 exam-level questions, detailed solutions and performance analysis. First questions free.

    Paper breakdown

    32 questions · 48 marks · 1.44 minutes. Probability and Statistics: 5 · Machine Learning: 5 · Database Management and Warehousing: 5 · Programming, Data Structures and Algorithms: 4 · Quantitative Aptitude: 3 · Linear Algebra: 3 · Spatial Aptitude: 2 · Calculus and Optimization: 2 · Artificial Intelligence: 2 · Verbal Aptitude: 1

    Free sample questions from Numerical Computation & Estimation, Programming Fundamentals, Vector Spaces…

    Question 1 · Probability and Statistics · 2025 NAT
    There are three boxes containing white balls and black balls.

    Box-1 contains 2 black and 1 white balls.
    Box-2 contains 1 black and 2 white balls.
    Box-3 contains 3 black and 3 white balls.

    In a random experiment, one of these boxes is selected, where the probability of choosing Box-1 is , Box-2 is , and Box-3 is . A ball is drawn at random from the selected box. Given that the ball drawn is white, the probability that it is drawn from Box-2 is
    (Round off to two decimal places)
    Correct Answer:

    0.25

    Step-by-Step Solution

    Insight: Three-box Bayes. The partition is , the evidence is "white ball drawn". You want .

    Exam route:

    Step 1 — Priors and likelihoods:

    Step 2 — Branches:

    Step 3 — Total:

    Step 4 — Posterior:

    Learning route: Each box is a hypothesis. The evidence "white ball" is more likely under Box 2 than Box 1 or 3, but Box 2 is chosen less often a priori. Bayes balances these two forces.

    Trap check: If you forget that Box 3 has 3 white out of 6 and write or , the denominator breaks. Always reduce the fraction first.

    Verification: . ✓

    Question 2 · Probability and Statistics · 2025 NAT
    The naive Bayes classifier is used to solve a two-class classification problem with class-labels . Suppose the prior probabilities are and . Assuming a discrete feature space with

    and for a specific feature vector . The probability of misclassifying is
    (Round off to two decimal places)
    Correct Answer:

    0.40

    Step-by-Step Solution

    Insight: This is a MAP-decision misclassification question. Compute both posteriors, pick the larger, and the misclassification probability is the posterior of the other class. Exam route: Step 1 — Unnormalised posteriors: Step 2 — Normalise: Sum Step 3 — MAP rule: predict (since ). Misclassification . Learning route: A Bayes classifier assigns to . The probability of being wrong is exactly the posterior of the class not chosen. Because the denominator is common, you can compare the unnormalised scores directly to find the winner, then normalise only to read off the loser's posterior. Trap check: If you misclassify as you would report $0.60$ — but MAP picks the larger posterior, so is the prediction and is the error. Verification: . ✓
    Question 3 · Probability and Statistics · 2026 MCQ
    Let



    Which of the following is the value of ?
    1. A.

      0.5

    2. B.

      1.0

    3. C.

      0

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: The sum is the cumulative distribution function (CDF) of a Poisson random variable with parameter n, evaluated at n. As n approaches infinity, the standardized Poisson converges to a standard normal distribution.

    Exam route: The sum represents where . Standardize the variable: . By the Central Limit Theorem, this converges to .

    Learning route: Recognize the summand as the probability mass function of a Poisson distribution with parameter . The sum from to is exactly the probability . Since a Poisson(n) variable can be viewed as the sum of independent Poisson(1) variables, the Central Limit Theorem applies. As , the standardized variable converges in distribution to . Therefore, the limit is .

    Question 4 · Machine Learning · 2025 MCQ
    Consider designing a linear classifier


    on a dataset , , , . Recall that the sign function outputs if the argument is positive, and if the argument is non-positive. The parameters and are updated as per the following training algorithm:


    whenever . In other words, whenever the classifier wrongly predicts a sample from the dataset, gets updated to , and likewise gets updated to . Consider the case , . Then
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: The perceptron update adds to and to . Evaluating the new score on the same misclassified point adds to the old score, strictly increasing it.

    Exam route: . Since , .

    Learning route:

    Step 1: We are given and . This is a misclassification, so an update occurs.

    Step 2: The update rules are and .

    Step 3: Evaluate the new score on the same point :

    Step 4: Substitute the updated parameters:

    Step 5: Since , we have . Therefore, . (Option A is correct).

    Step 6: Check Option D. We are given and . Their product is negative, so it cannot be . (Option D is false).

    Answer: A

    Question 5 · Machine Learning · 2024 MCQ
    For any binary classification dataset, let and be the
    between-class and within-class scatter (covariance) matrices, respectively. The
    Fisher linear discriminant is defined by , that maximizes

    If , is non-singular and , then must satisfy which ONE
    of the following equations?
    Note: denotes the set of real numbers.
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: Maximizing the Rayleigh quotient leads directly to the generalized eigenvalue problem .

    Exam route: Since is non-singular, left-multiply by to isolate the eigenvalue form: .

    Learning route:

    Step 1: The Fisher criterion is . To find the optimal , we set the gradient .

    Step 2: Applying the quotient rule of matrix calculus, the derivative simplifies to the condition .

    Step 3: The term in parentheses is exactly the scalar value . Thus, we get the generalized eigenvalue problem: .

    Step 4: Given that is non-singular (invertible), we can multiply both sides on the left by , yielding .

    Answer: A

    Question 6 · Machine Learning · 2025 NAT
    Given data of the form , we fit a model using linear least-squares regression. The optimal value of is
    (Round off to three decimal places)
    Correct Answer:

    0.286

    Step-by-Step Solution

    Insight: For a linear model without a bias term (), the optimal weight is the ratio of the sum of to the sum of .

    Exam route: Sum of . Sum of . .

    Learning route:

    1. Identify the model: . Notice there is no bias term ().
    2. Recall the scalar normal equation for no-bias least squares: .
    3. Compute the numerator : .
    4. Compute the denominator : .
    5. Calculate .
    6. Convert to decimal and round to three decimal places: .
    Question 7 · Database Management and Warehousing · 2024 NAT
    Consider the following two tables named Raider and Team in a relational database
    maintained by a Kabaddi league. The attribute ID in table Team references the
    primary key of the Raider table, ID.

    Raider
    IDNameRaidsRaidPoints
    1Arjun200250
    2Ankush190219
    3Sunil150200
    4Reza150190
    5Pratham175220
    6Gopal193215

    The SQL query described below is executed on this database:

    SELECT *
    FROM Raider, Team
    WHERE Raider.ID=Team.ID AND City=“Jaipur” AND
    RaidPoints > 200;

    The number of rows returned by this query is ______.

    Team
    CityIDBidPoints
    Jaipur2200
    Patna3195
    Hyderabad5175
    Jaipur1250
    Patna4200
    Jaipur6200
    Correct Answer:

    3.00

    Step-by-Step Solution

    Insight: The query performs an implicit inner join on ID, then filters by City and RaidPoints. Count the rows that satisfy both conditions.

    Exam route: Join the tables on ID, then apply the WHERE conditions row by row.

    Learning route:

    Step 1: Join Raider and Team on ID.

    ID=1: (Arjun, 250) ⋈ (Jaipur, 1, 250) → RaidPoints=250, City=Jaipur

    ID=2: (Ankush, 219) ⋈ (Jaipur, 2, 200) → RaidPoints=219, City=Jaipur

    ID=3: (Sunil, 200) ⋈ (Patna, 3, 195) → RaidPoints=200, City=Patna

    ID=4: (Reza, 190) ⋈ (Patna, 4, 200) → RaidPoints=190, City=Patna

    ID=5: (Pratham, 220) ⋈ (Hyderabad, 5, 175) → RaidPoints=220, City=Hyderabad

    ID=6: (Gopal, 215) ⋈ (Jaipur, 6, 200) → RaidPoints=215, City=Jaipur

    Step 2: Apply WHERE City="Jaipur" AND RaidPoints > 200.

    ID=1: Jaipur, 250 > 200 → TRUE

    ID=2: Jaipur, 219 > 200 → TRUE

    ID=3: Patna → FALSE

    ID=4: Patna → FALSE

    ID=5: Hyderabad → FALSE

    ID=6: Jaipur, 215 > 200 → TRUE

    Step 3: Count TRUE rows: ID=1, 2, 6 → 3 rows.

    Verification: Check each Jaipur row: 250, 219, 215 are all > 200. Count is 3.

    Question 8 · Database Management and Warehousing · 2025 NAT
    On a relation named Loan of a bank:

    Loan
    loan number branch name amount
    L11 Banjara Hills 90000
    L14 Kondapur 50000
    L15 SR Nagar 40000
    L22 SR Nagar 25000
    L23 Balanagar 80000
    L25 Kondapur 70000
    L19 SR Nagar 65000

    the following SQL query is executed.

    SELECT L1.loan number
    FROM Loan L1
    WHERE L1.amount > (SELECT MAX (L2.amount)
                        FROM Loan L2
                        WHERE L2.branch name = ’SR Nagar’);

    The number of rows returned by the query is (Answer in integer)
    Correct Answer:

    3.00

    Step-by-Step Solution

    Insight: The inner subquery is non-correlated (it does not reference L1), so it evaluates exactly once to a single scalar value.

    Exam route: Compute MAX(amount) for branch_name = 'SR Nagar' first, then count outer rows with amount strictly greater than that value.

    Learning route:

    Step 1: Identify the inner query. It selects MAX(L2.amount) FROM Loan L2 WHERE L2.branch_name = 'SR Nagar'. Since L2 does not reference L1, this is a non-correlated subquery and runs once.

    Step 2: Filter Loan for branch_name = 'SR Nagar'. The matching rows are:

    • L15: 40000
    • L22: 25000
    • L19: 65000

    Step 3: MAX(40000, 25000, 65000) = 65000.

    Step 4: The outer query becomes: SELECT loan_number FROM Loan WHERE amount > 65000.

    Step 5: Check each row of Loan:

    • L11: 90000 > 65000 ✓
    • L14: 50000 > 65000 ✗
    • L15: 40000 > 65000 ✗
    • L22: 25000 > 65000 ✗
    • L23: 80000 > 65000 ✓
    • L25: 70000 > 65000 ✓
    • L19: 65000 > 65000 ✗ (strict inequality)

    Step 6: Count the TRUE rows: L11, L23, L25 → 3 rows.

    Verification: Plug 65000 back — only 90000, 80000, 70000 are strictly greater. Count is 3.

    Question 9 · Database Management and Warehousing · 2026 MSQ
    Consider a table Employee(EmpID, TeamID), where the column EmpID (ID of an employee) is the primary key. The column TeamID denotes the team ID of the team of which the employee is a member. TeamID is a NOT NULL column.

    We want to display the size of the team (denoted as TeamSize) in which each employee is a member by using SQL. As an example, the desired output for the given Employee table is also shown in tabular form.

    Which of the following is/are correct?

    Employee
    EmpID TeamID
    1 8
    2 8
    3 8
    4 7
    5 7
    6 9

    Output
    EmpID TeamSize
    1 3
    2 3
    3 3
    4 2
    5 2
    6 1
    1. A. SELECT E.EmpID, B.TeamSize
      FROM Employee AS E, (SELECT TeamID, COUNT(TeamID) AS TeamSize FROM Employee GROUP BY TeamID) AS B
      WHERE E.TeamID = B.TeamID
    2. B. SELECT A.EmpID, COUNT(B.TeamID) AS TeamSize
      FROM Employee AS A, Employee AS B
      WHERE A.TeamID = B.TeamID AND A.EmpID = B.EmpID
      GROUP BY A.EmpID
    3. C. SELECT B.EmpID, B.TeamSize
      FROM (SELECT EmpID, COUNT(TeamID) AS TeamSize
      FROM Employee GROUP BY EmpID) AS B
    4. D. SELECT A.EmpID, B.TeamSize
      FROM Employee AS A, (SELECT COUNT(TeamID) AS TeamSize FROM Employee GROUP BY TeamID) AS B
      WHERE A.TeamID = B.TeamID
    Correct Answer:

    ["A"]

    Step-by-Step Solution

    Insight: To display an aggregate (team size) for each individual row without collapsing the output, we must compute the aggregate in a derived table or use a self-join that preserves individual IDs.

    Exam route: Evaluate each option's GROUP BY and JOIN conditions to see which correctly pairs each employee with their team's total count.

    Learning route:

    Step 1: Analyze Option A. The inner query groups by TeamID and counts the members, producing a derived table B with columns (TeamID, TeamSize). The outer query joins Employee E with B on TeamID. This correctly assigns the team size to each employee. This matches the desired output.

    Step 2: Analyze Option B. The self-join condition includes A.EmpID = B.EmpID. Since EmpID is the primary key, this restricts B to be exactly the same row as A. COUNT(B.TeamID) will always be 1 for every employee. This is incorrect.

    Step 3: Analyze Option C. The query groups by EmpID. Since EmpID is the primary key, each group contains exactly one row. COUNT(TeamID) will always be 1. This is incorrect.

    Step 4: Analyze Option D. The derived table B only selects COUNT(TeamID) AS TeamSize; it does not include TeamID in its SELECT list. The outer query's WHERE clause attempts to join on B.TeamID, which does not exist in the derived table. This will cause a SQL error. This is incorrect.

    Verification: Only Option A correctly computes the team sizes (3, 3, 3, 2, 2, 1) and joins them back to the individual employees.

    Question 10 · Programming, Data Structures and Algorithms · 2026 MCQ
    Consider the given Python program.

    def append_to_lst(val, lst=[]):
        lst.append(val)
        return lst
    print(append_to_lst(1))
    print(append_to_lst(2))
    print(append_to_lst(3, []))

    Which of the following is the correct output of this program?
    1. A. [1]
      [2]
      [3]
    2. B. [1]
      [1, 2]
      [3]
    3. C. [1]
      [2]
      [1, 2, 3]
    4. D. [1]
      [1, 2]
      [1, 3]
    Correct Answer:

    B

    Step-by-Step Solution

    Insight: Default arguments are evaluated exactly once at definition time; mutating a mutable default object persists its state across all subsequent calls that use the default.

    Exam route: Call 1 uses the default empty list, appends 1, and returns [1]. The default list is now [1]. Call 2 uses that same default list, appends 2, and returns [1, 2]. Call 3 explicitly passes a new empty list, bypassing the default, appends 3, and returns [3].

    Learning route: This is a classic mutable default argument question, recognizable by the lst=[] parameter. When Python executes the def statement, it creates a single list object and stores it as the default.

    Step 1: In the first call append_to_lst(1), no list is provided, so lst binds to the default []. The append method mutates this default object to [1]. The function returns [1].

    Step 2: In the second call append_to_lst(2), no list is provided, so lst binds to the exact same default object, which is now [1]. The append method mutates it to [1, 2]. The function returns [1, 2].

    Step 3: In the third call append_to_lst(3, []), a new list is explicitly provided. The parameter lst binds to this new object, completely ignoring the default. The append method mutates the new list to [3]. The function returns [3].

    The final output is [1], then [1, 2], then [3].

    Answer: Option B.

    Question 11 · Programming, Data Structures and Algorithms · 2024 MCQ
    Consider the following Python function:
    def fun(D, s1, s2):
    if s1 < s2:
    D[s1], D[s2] = D[s2], D[s1]
    fun(D, s1+1, s2-1)
    What does this Python function fun() do? Select the ONE appropriate option
    below.
    1. A.

      It finds the smallest element in D from index s1 to s2, both inclusive.

    2. B.

      It performs a merge sort in-place on this list D between indices s1 and s2, both inclusive.

    3. C.

      It reverses the list D between indices s1 and s2, both inclusive.

    4. D.

      It swaps the elements in D at indices s1 and s2, and leaves the remaining elements unchanged.

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: The function swaps the elements at s1 and s2, then recursively calls itself with s1+1 and s2-1. This is the standard two-pointer recursive reversal pattern.

    Exam route: Recognize the two pointers moving inwards (s1+1, s2-1) and swapping elements. This reverses the subarray from s1 to s2.

    Learning route:

    Base case: s1 < s2 is false (i.e., s1 >= s2), it stops.

    Recursive step: swaps D[s1] and D[s2], then moves pointers inward.

    This exactly reverses the segment D[s1...s2] in place.

    Question 12 · Programming, Data Structures and Algorithms · 2026 MSQ
    Consider the given Python program.

    def outer():
        x = []
        def inner(val):
            x.append(val)
            return x
        return inner

    f1 = outer()
    f2 = outer()
    print(f1(10)) # Line P
    print(f1(20)) # Line Q
    print(f2(30)) # Line R
    print(f1(40)) # Line S

    Which of the following options is/are correct?
    1. A.

      f1 and f2 share the same list x

    2. B.

      Output of Line Q is [10, 20]

    3. C.

      Output of Line R is [10, 20, 30]

    4. D.

      Output of Line S is [10, 20, 40]

    Correct Answer:

    ["B","D"]

    Step-by-Step Solution

    Insight: Each call to the outer function creates a completely independent closure with its own isolated cell objects for enclosed variables.

    Exam route: f1 and f2 are created by separate calls to outer(), so they have separate x lists. f1(10) -> [10], f1(20) -> [10, 20] (Line Q). f2(30) -> [30] (Line R). f1(40) -> [10, 20, 40] (Line S).

    Learning route: This is a closure instance isolation question, recognizable by the nested function returning an inner function that modifies an enclosed mutable variable.

    Step 1: When f1 = outer() is executed, a new list x is created in outer's local scope. The inner function captures this specific list in its closure cell. f1 now points to this specific inner function instance.

    Step 2: When f2 = outer() is executed, a completely new list x is created. A new inner function instance is created, capturing this new list. f2 points to this second instance. f1 and f2 do not share any state.

    Step 3: Line P: f1(10) appends 10 to f1's list. Returns [10].

    Step 4: Line Q: f1(20) appends 20 to f1's list. Returns [10, 20]. Option B is correct.

    Step 5: Line R: f2(30) appends 30 to f2's list. Since f2's list is independent and starts empty, it returns [30]. Option C is incorrect.

    Step 6: Line S: f1(40) appends 40 to f1's list. Returns [10, 20, 40]. Option D is correct.

    Answer: Options B and D.

    Question 13 · Quantitative Aptitude · 2026 MCQ
    Consider two distinct positive real numbers , with .
    Let and . The relation between and is _______.
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: Taking the logarithm of both expressions reveals that their log values are identical due to the commutative property of multiplication.

    Exam route: Apply to both and . Use the power rule to bring the exponents down. Compare the results.

    Learning route:

    Given and .

    Take of both sides for :

    .

    Take of both sides for :

    .

    Since multiplication is commutative, .

    Therefore, .

    Since the logarithm function is one-to-one, this implies .

    The relation is , matching option C.

    Question 14 · Quantitative Aptitude · 2024 MCQ
    The sum of the following infinite series is
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: The series is a mix of a constant, a geometric series with ratio 1/2, and another with ratio 1/3.

    Exam route: Group the terms by their denominators' patterns. Sum the two infinite geometric series separately using and add to the initial constant.

    Learning route:

    The given series is

    Observe the denominators after the first term: 2, 4, 8, 16... are powers of 2. 3, 9, 27... are powers of 3.

    We can split the series into three parts:

    The first bracket is a geometric series with and . Its sum is .

    The second bracket is a geometric series with and . Its sum is .

    Total sum .

    Correct option is B.

    Question 15 · Quantitative Aptitude · 2025 MCQ

    If a real variable satisfies , then the value of is:

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: Unify the bases to 3 to find a relation between and , then substitute this relation directly into the target expression without solving for .

    Exam route: Convert $27$ and to base 3. Equate exponents to get . Simplify the target expression to and substitute 3.

    Learning route:

    Given .

    Express all terms with base 3: and .

    So, .

    Since the bases are equal, equate the exponents:

    .

    Now look at the target expression: .

    Using exponent laws, .

    So the expression becomes .

    Substitute into the exponent:

    .

    The value is , which matches option C.

    Question 16 · Linear Algebra · 2026 MCQ
    Consider a set . Let be another set which is a subspace of with dimension two.
    Which of the following gives the area of ?
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: The intersection of a solid n-dimensional ball with a k-dimensional subspace passing through the origin is a solid k-dimensional ball of the exact same radius.

    Exam route: means , so it's a solid 3D ball of radius . is a 2D subspace (a plane through the origin). The intersection is a 2D solid disk of radius 4. Area = .

    Learning route:

    1. Identify : The condition is equivalent to , which means . This defines a solid 3-dimensional ball centered at the origin with radius .
    2. Identify : A subspace of with dimension 2 is a flat plane that passes exactly through the origin.
    3. Find the intersection : Slicing a solid 3D sphere with a plane that passes through its exact center (the origin) yields a solid 2D disk (a "great disk") with the same radius .
    4. Calculate the area: The area of a 2D disk of radius is . Substituting , we get Area = .
    Question 17 · Linear Algebra · 2025 MSQ

    Which of the following statements is/are correct?

    1. A.

      has a unique set of orthonormal basis vectors

    2. B.

      does not have a unique set of orthonormal basis vectors

    3. C.

      Linearly independent vectors in are orthonormal

    4. D.

      Orthonormal vectors are linearly independent

    Correct Answer:

    ["B","D"]

    Step-by-Step Solution

    Insight: Orthonormal bases are not unique (any rotation works), but orthonormality strictly guarantees linear independence.

    Exam route: Evaluate each option. A is false because we can rotate the standard basis. B is true. C is false because independent vectors need not be orthogonal. D is true because orthonormal vectors are always independent.

    Learning route:

    1. An orthonormal basis for requires vectors to be mutually orthogonal and unit length. The standard basis is one, but any rotation of it (e.g., in , using and ) is another. Thus, it is not unique (A is false, B is true).
    2. For C, consider vectors and in . They are linearly independent, but their dot product is , so they are not orthogonal. Thus, independent vectors are not necessarily orthonormal.
    3. For D, let be orthonormal. Suppose . Taking the dot product with gives . Thus, they are linearly independent.
    Question 18 · Linear Algebra · 2024 MSQ
    Select all choices that are subspaces of .
    Note: denotes the set of real numbers.
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    ["A","C"]

    Step-by-Step Solution

    Insight: Subspaces must be closed under all scalar multiplications (including negative) and contain the origin. Spans of vectors and solutions to homogeneous linear equations are always subspaces.

    Exam route: Check each option against the subspace criteria. A is a span (subspace). B uses squared parameters (only non-negative scalars, fails closure). C is a homogeneous system (subspace). D is a non-homogeneous system (fails zero vector).

    Learning route:

    1. Option A: This is the span of two vectors, . The span of any set of vectors is always a subspace because it is closed under addition and scalar multiplication by definition.
    2. Option B: The coefficients are and . Since squares of real numbers are always non-negative (), we can only form non-negative linear combinations. If we multiply a vector in this set by , we cannot guarantee it remains in the set. It fails closure under scalar multiplication.
    3. Option C: This is the solution set to a system of homogeneous linear equations (). The null space of any matrix is always a subspace. It contains the zero vector and is closed under addition and scalar multiplication.
    4. Option D: The equation is . To be a subspace, it must contain the zero vector . Substituting gives . It fails the zero vector test.
    Question 19 · Spatial Aptitude · 2026 MCQ
    The four pieces of a puzzle are shown in the figure below.
    P Q R S
    Which one of the figures labelled as P, Q, R, and S can be constructed by using each of the four pieces only once without overlaps?
    1. A.

      P

    2. B.

      Q

    3. C.

      R

    4. D.

      S

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is a 2D puzzle assembly problem. The key is to identify the straight outer edges that must form the perimeter of the target rectangle, and then match the complex inner jagged/curved edges to form the specific cutout shape.

    Exam route: Identify the pieces with straight outer boundaries (left, right, bottom, top). These must form the frame of the rectangle. The remaining internal boundaries must interlock to form the white hole. Compare the inner boundary profile of the assembled frame with the cutout profiles in P, Q, R, S.

    Learning route:

    1. Analyze the puzzle pieces. We have pieces with straight outer edges and complex inner edges (jagged steps and curves).
    2. Identify the 'frame' pieces:
    • One piece has a straight vertical left edge and straight horizontal bottom edge. It must anchor the bottom-left corner.
    • Another piece has a straight vertical right edge and straight horizontal bottom edge. It must anchor the bottom-right corner.
    • A third piece has a straight horizontal top edge. It must sit at the top center.
    1. When these pieces are placed in their respective corners/edges, they form a rectangular frame with a large, irregular hole in the center.
    2. The boundary of this hole is defined by:
    • Left side: The jagged right edge of the left piece.
    • Right side: The jagged left edge of the right piece.
    • Top/Bottom sides: The curved edges of the remaining pieces.
    1. Now examine the target options P, Q, R, S. Each shows a rectangle with a specific white cutout. The correct option must have a cutout whose outer boundary perfectly matches the hole's boundary.
    2. Look at the left edge of the cutouts:
    • Figure P has a complex boundary that matches the interlocking tabs and slots of the assembled pieces. Specifically, the vertical and diagonal segments in P's cutout align perfectly with the step-pattern on the left-most puzzle piece.
    • Figures Q and S have smooth or mismatched curved left edges that cannot mate with the sharp zigzag of the left piece.
    • Figure R has a zigzag profile with different tab depths and angles that would leave gaps or cause overlaps.
    1. Therefore, Figure P is the only shape that can be constructed by assembling the pieces without overlaps, as its negative space perfectly receives the interlocking boundaries of the frame pieces.

    Trap Analysis: The 'Rotation Illusion' trap occurs if you try to rotate the target figures P, Q, R, S. In standard assembly questions of this type, the outer frame is fixed (horizontal/vertical), and you only rotate the individual pieces to fit the frame. Do not rotate the final assembled rectangle. Also, avoid the 'Flip Assumption'—pieces can be rotated in the plane but not flipped over (reflected) unless they are symmetric.

    Verification: By mentally sliding the left piece to the left, the right piece to the right, and the top piece to the top, the resulting negative space is an exact silhouette of the white cutout in P.

    Question 20 · Spatial Aptitude · 2025 MCQ
    A regular dodecagon (12-sided regular polygon) is inscribed in a circle of radius cm as shown in the figure. The side of the dodecagon is cm. All the triangles (numbered 1 to 12) in the figure are used to form squares of side cm and each numbered triangle is used only once to form a square.
    The number of squares that can be formed and the number of triangles required to form each square, respectively, are:

    Note: The figure shown is representative.

    1 2 3 4 5 6 7 8 9 10
    1. A.

      3; 4

    2. B.

      4; 3

    3. C.

      3; 3

    4. D.

      3; 2

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is a geometric decomposition question disguised as a pattern puzzle. The fastest and most rigorous route is area conservation.

    Exam route: Calculate the area of one central triangle, multiply by 12 to get the total available area, and divide by the area of the target square to find the number of squares. Then divide the total triangles by the number of squares to find the count per square.

    Learning route:

    1. Identify the properties of the given triangles. A regular dodecagon inscribed in a circle of radius is divided into 12 congruent isosceles triangles by lines from the center to each vertex.
    2. Each triangle has two sides equal to the radius , and the included central angle is .
    3. Calculate the area of one such triangle using the sine formula for the area of a triangle:

    .

    1. Calculate the total area of all 12 triangles available:

    .

    1. The problem states we must form squares of side cm. The area of one such square is .
    2. By the principle of area conservation (assuming no overlaps or gaps, which is standard for such assembly puzzles), the maximum number of complete squares we can form is:

    .

    1. Since all 12 triangles are used exactly once to form these 3 squares, the number of triangles required for each square is:

    .

    1. Therefore, 3 squares can be formed, each requiring 4 triangles.

    Trap Analysis: A common mistake is to notice that and assume that 3 triangles can be arranged around a central point to form the corner of a square. If a student assumes 3 triangles make one square, they would calculate squares. This leads to Option B (4; 3). However, this ignores area conservation: 3 triangles only have an area of , which is strictly less than the required for a square of side . The geometric arrangement of 4 triangles into a square of side is possible through specific non-symmetric interlocking dissections, but the area argument uniquely and immediately identifies the correct counts without needing to visualize the complex tiling.

    Verification: . Total area = . Matches perfectly.

    Question 21 · Calculus and Optimization · 2025 NAT

    (Round off to one decimal place)

    Correct Answer:

    0.50

    Step-by-Step Solution

    Insight: This is an indeterminate form. Rationalise by multiplying and dividing by the conjugate , or equivalently factor out and use the binomial approximation.

    Exam route: Rationalise → simplify → divide numerator and denominator by → substitute .

    Learning route:

    This is an infinity-minus-infinity limit question, recognisable because both and , giving the indeterminate form .

    Method 1 — Conjugate rationalisation (recommended for exams):

    Step 1 — Multiply and divide by the conjugate:

    Step 2 — Simplify the numerator using :

    Step 3 — Divide numerator and denominator by (valid since ):

    Step 4 — Take the limit as (so ):

    Method 2 — Binomial expansion:

    Factor from the square root: .

    Using with :

    Trap check: A common error is to conclude the limit is $0$ by arguing "both terms go to infinity, so they cancel." This ignores the sub-leading term that survives.

    Verification: At : . Confirmed.

    The answer is $0.5$ (rounded to one decimal place: $0.5$).

    Question 22 · Calculus and Optimization · 2024 NAT
    Evaluate the following limit:
    Correct Answer:

    0.50

    Step-by-Step Solution

    Insight: The numerator is a log of a product, so split it into , then expand each piece to order using standard Taylor series.

    Exam route: Split log → expand and → add → divide by → get .

    Learning route:

    This is a log-trig limit via Taylor expansion question, recognisable because direct substitution gives , an indeterminate form, and the numerator contains of a product involving a trig function.

    Step 1 — Use the log product rule:

    Step 2 — Expand using with :

    Step 3 — Expand . First, . Let , then:

    Step 4 — Combine the numerator:

    Step 5 — Divide by :

    Trap check: If you forget to expand and only keep , you would get , which is wrong. Both log terms contribute at order .

    Verification: Numerical check at : . Confirmed.

    The answer is $0.50$.

    Question 23 · Artificial Intelligence · 2024 MCQ
    Let
    and
    be two admissible heuristics used in
    search.
    Which ONE of the following expressions is always an admissible heuristic?
    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: An admissible heuristic must never overestimate the true cost . The absolute difference of two admissible heuristics is bounded by their maximum, which is itself bounded by .

    Exam route: Check each option against a counterexample. For , if , sum is 16 > 10 (fails). For , since , the maximum possible difference is . Thus, , guaranteeing admissibility.

    Learning route:

    Step 1: Recall definition: is admissible if for all .

    Step 2: Test : Let . Sum = 16 > 10. Not admissible.

    Step 3: Test : Let . Product = 16 > 10. Not admissible.

    Step 4: Test : Let . Quotient = 16 > 10. Not admissible.

    Step 5: Test : Since both and are between $0$ and , their difference must lie in the range . Taking the absolute value ensures the result is in . Therefore, it never overestimates and is always admissible.

    Answer:

    Question 24 · Artificial Intelligence · 2025 MCQ
    The state graph shows the action cost along the edges and the heuristic function associated with each state.

    S A E B C D G 4 1 2 2 2 2 3 3 h=2 h=2 h=6 h=2 h=0 h=6
    Suppose algorithm is applied on this state graph using priority queue to store the frontier. In what sequence are the nodes expanded?
    1. A.

      S,A,E,C,B,D,G

    2. B.

      S,E,A,C,B,D,G

    3. C.

      S,A,E,B,C,D,G

    4. D.

      S,A,B,E,C,D,G

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: A* expansion order is strictly dictated by the value, with mandatory updates to if a cheaper path to an already discovered node is found.

    Exam route: Calculate for all generated nodes. S(f=6) A(f=6), E(f=7). Pop A B(f=8). Pop E update B to f=5, add C(f=9). Pop B(f=5) C is already f=9 (better). Pop C(f=9) D(f=8). Pop D(f=8) G(f=9). Pop G.

    Learning route:

    Step 1: Init: Open = {S(f=0+6=6)}.

    Step 2: Pop S. Gen A(g=4, h=2, f=6), E(g=1, h=6, f=7). Open = {A(f=6), E(f=7)}.

    Step 3: Pop A (lowest f). Gen B(g=4+2=6, h=2, f=8). Open = {E(f=7), B(f=8)}.

    Step 4: Pop E (lowest f). Gen B(g=1+2=3, h=2, f=5). Since 5 < 8, update B's cost! Gen C(g=1+2=3, h=6, f=9). Open = {B(f=5), C(f=9)}.

    Step 5: Pop B (lowest f). Gen C(g=3+2=5, h=6, f=11). Existing C has f=9, which is better, so ignore. Open = {C(f=9)}.

    Step 6: Pop C. Gen D(g=3+3=6, h=2, f=8). Open = {D(f=8)}.

    Step 7: Pop D. Gen G(g=6+3=9, h=0, f=9). Open = {G(f=9)}.

    Step 8: Pop G. Goal reached.

    Expansion sequence: S, A, E, B, C, D, G.

    Answer: S, A, E, B, C, D, G.

    Question 25 · Verbal Aptitude · 2025 MCQ
    We __________ tennis in the lawn when it suddenly started to rain.

    Select the most appropriate option to complete the above sentence.
    1. A.

      have been playing

    2. B.

      had been playing

    3. C.

      would have been playing

    4. D.

      could be playing

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: The sentence describes a past action that was ongoing up until another past event interrupted it.

    Exam route: The interrupting event "started to rain" is in the simple past. The main action must be in a past tense that shows ongoing duration up to that point. Among the options, only "had been playing" (past perfect continuous) fits this past duration requirement.

    Learning route:

    Step 1: Anchor the time. The phrase "started to rain" places the entire sentence in the past.

    Step 2: Identify the aspect. The action of playing tennis was ongoing for a duration before the rain started. This requires a continuous aspect in the past.

    Step 3: Evaluate options. "have been playing" is present perfect continuous (wrong time). "would have been playing" is conditional (no conditional context). "could be playing" is present modal (wrong time). "had been playing" is past perfect continuous, correctly showing an action ongoing up to a past reference point.

    More GATE DA tests