TCS NQT 2027 Recently Asked Questions – 5th & 9th June Assessment | Coding Solutions

🔥 Real Exam Questions — Batch 2027

TCS NQT Recently Asked Coding Questions

Actual questions from the June 2025 TCS National Qualifier Test with complete solutions in Java, C++, and Python.

📅 5th June 2026 – Q1 & Q2 📅 9th June 2026 – Q3 & Q4

These are verified, student-reported questions from the TCS NQT 2027 (Batch) assessment held in June 2025. Questions 1 & 2 were reported from the 5th June 2026 slot; Questions 3 & 4 from the 9th June 2026 slot. Use this guide to understand the pattern, practice the problems, and go in prepared.

1
Coin Pair Indices (Two Sum Variant)
Easy

Problem Statement

You are given an array of integers representing coin values and an integer target. Find two different indices such that the sum of coin values at those indices equals the target. Return the indices of the two coins.

Example

Input: coins = [2, 7, 11, 15], target = 9 Output: [0, 1] coins[0] + coins[1] = 2 + 7 = 9 ✓

Approach

  • Use a HashMap to store each value and its index as you iterate.
  • For each element, compute complement = target - coins[i].
  • If complement exists in the map, return both indices immediately.
  • Single-pass O(n) — much faster than a brute-force nested loop.
⏱ Time: O(n) 🗂 Space: O(n)

Solution

import java.util.HashMap;

public class Solution {
    public static int[] coinPairIndices(int[] coins, int target) {
        HashMap<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < coins.length; i++) {
            int complement = target - coins[i];
            if (map.containsKey(complement)) {
                return new int[] { map.get(complement), i };
            }
            map.put(coins[i], i);
        }
        return new int[] { -1, -1 }; // no pair found
    }

    public static void main(String[] args) {
        int[] coins = {2, 7, 11, 15};
        int[] result = coinPairIndices(coins, 9);
        System.out.println("[" + result[0] + ", " + result[1] + "]"); // [0, 1]
    }
}
#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;

vector<int> coinPairIndices(vector<int>& coins, int target) {
    unordered_map<int, int> mp;
    for (int i = 0; i < coins.size(); i++) {
        int complement = target - coins[i];
        if (mp.count(complement))
            return { mp[complement], i };
        mp[coins[i]] = i;
    }
    return { -1, -1 };
}

int main() {
    vector<int> coins = {2, 7, 11, 15};
    auto res = coinPairIndices(coins, 9);
    cout << "[" << res[0] << ", " << res[1] << "]" << endl; // [0, 1]
}
def coin_pair_indices(coins, target):
    seen = {}
    for i, val in enumerate(coins):
        complement = target - val
        if complement in seen:
            return [seen[complement], i]
        seen[val] = i
    return [-1, -1]

# Test
coins = [2, 7, 11, 15]
print(coin_pair_indices(coins, 9))  # [0, 1]
2
Merge Two Arrays into a Sorted Array
Easy

Problem Statement

You are given two arrays: Array A sorted in ascending order and Array B sorted in descending order. Create a new array containing all elements from both arrays sorted in ascending order.

Example

Input: A = [1, 3, 5, 7] (ascending) B = [10, 8, 6, 4] (descending) Output: [1, 3, 4, 5, 6, 7, 8, 10]

Approach

  • Reverse array B (now it's ascending), or use a reverse pointer.
  • Merge both sorted arrays using the classic two-pointer technique.
  • Compare elements from A and reversed-B, push the smaller one.
  • Flush remaining elements of either array at the end.
⏱ Time: O(n + m) 🗂 Space: O(n + m)

Solution

import java.util.Arrays;

public class MergeArrays {
    public static int[] mergeSorted(int[] A, int[] B) {
        // Reverse B to make it ascending
        int left = 0, right = B.length - 1;
        while (left < right) {
            int tmp = B[left]; B[left] = B[right]; B[right] = tmp;
            left++; right--;
        }
        // Two-pointer merge
        int[] result = new int[A.length + B.length];
        int i = 0, j = 0, k = 0;
        while (i < A.length && j < B.length)
            result[k++] = A[i] <= B[j] ? A[i++] : B[j++];
        while (i < A.length) result[k++] = A[i++];
        while (j < B.length) result[k++] = B[j++];
        return result;
    }

    public static void main(String[] args) {
        int[] A = {1,3,5,7}, B = {10,8,6,4};
        System.out.println(Arrays.toString(mergeSorted(A, B)));
        // [1, 3, 4, 5, 6, 7, 8, 10]
    }
}
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

vector<int> mergeSorted(vector<int> A, vector<int> B) {
    reverse(B.begin(), B.end());
    vector<int> result;
    int i = 0, j = 0;
    while (i < A.size() && j < B.size())
        result.push_back(A[i] <= B[j] ? A[i++] : B[j++]);
    while (i < A.size()) result.push_back(A[i++]);
    while (j < B.size()) result.push_back(B[j++]);
    return result;
}

int main() {
    vector<int> A = {1,3,5,7}, B = {10,8,6,4};
    for (auto v : mergeSorted(A, B)) cout << v << " ";
    // 1 3 4 5 6 7 8 10
}
def merge_sorted(A, B):
    B_asc = B[::-1]   # reverse B to ascending
    result = []
    i = j = 0
    while i < len(A) and j < len(B_asc):
        if A[i] <= B_asc[j]:
            result.append(A[i]); i += 1
        else:
            result.append(B_asc[j]); j += 1
    result.extend(A[i:])
    result.extend(B_asc[j:])
    return result

print(merge_sorted([1,3,5,7], [10,8,6,4]))
# [1, 3, 4, 5, 6, 7, 8, 10]
3
First Occurrence of Target in an Array
Easy

Problem Statement

Given an array of integers and a target value, find the index of the first occurrence of the target in the array. If the target is not present, return -1.

Examples

Example 1 — Target found: arr = [4, 2, 7, 2, 9, 2], target = 2 → Output: 1 Target 2 appears at indices 1, 3, 5. First occurrence is index 1.
Example 2 — Target not found: arr = [5, 8, 1, 6], target = 3 → Output: -1

Approach

  • Simple linear scan — iterate left to right.
  • Return the index immediately when arr[i] == target.
  • If the loop ends without a match, return -1.
⏱ Time: O(n) 🗂 Space: O(1)

Solution

public class FirstOccurrence {
    public static int firstOccurrence(int[] arr, int target) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == target) return i;
        }
        return -1;
    }

    public static void main(String[] args) {
        int[] arr = {4, 2, 7, 2, 9, 2};
        System.out.println(firstOccurrence(arr, 2)); // 1
        System.out.println(firstOccurrence(arr, 3)); // -1
    }
}
#include <iostream>
#include <vector>
using namespace std;

int firstOccurrence(vector<int>& arr, int target) {
    for (int i = 0; i < arr.size(); i++)
        if (arr[i] == target) return i;
    return -1;
}

int main() {
    vector<int> arr = {4,2,7,2,9,2};
    cout << firstOccurrence(arr, 2) << endl; // 1
    cout << firstOccurrence(arr, 3) << endl; // -1
}
def first_occurrence(arr, target):
    for i, val in enumerate(arr):
        if val == target:
            return i
    return -1

print(first_occurrence([4,2,7,2,9,2], 2))  # 1
print(first_occurrence([5,8,1,6], 3))          # -1
4
Minimum Depth of a Binary Tree
Medium

Problem Statement

Given the root of a binary tree, return its minimum depth — the number of nodes along the shortest path from the root node down to the nearest leaf node. A leaf node has no left or right children.

Example

Input Tree: 1 / \ 2 3 / 4 Output: 2 Shortest path: 1 → 3 (length 2). Node 3 is a leaf.

Approach

  • Use Breadth-First Search (BFS) — guaranteed to reach the nearest leaf first.
  • Process level by level; the moment you encounter a leaf, return the current depth.
  • BFS is preferred over DFS here since DFS explores full branches before finding the minimum.
  • Handle edge cases: null root → return 0; single root (leaf) → return 1.
⏱ Time: O(n) 🗂 Space: O(n) — BFS queue

Solution

import java.util.LinkedList;
import java.util.Queue;

public class MinDepth {
    static class TreeNode {
        int val;
        TreeNode left, right;
        TreeNode(int v) { val = v; }
    }

    public static int minDepth(TreeNode root) {
        if (root == null) return 0;
        Queue<TreeNode> q = new LinkedList<>();
        q.offer(root);
        int depth = 1;
        while (!q.isEmpty()) {
            int size = q.size();
            for (int i = 0; i < size; i++) {
                TreeNode node = q.poll();
                if (node.left == null && node.right == null)
                    return depth; // leaf reached!
                if (node.left  != null) q.offer(node.left);
                if (node.right != null) q.offer(node.right);
            }
            depth++;
        }
        return depth;
    }

    public static void main(String[] args) {
        TreeNode root = new TreeNode(1);
        root.left = new TreeNode(2);
        root.right = new TreeNode(3);
        root.left.left = new TreeNode(4);
        System.out.println(minDepth(root)); // 2
    }
}
#include <iostream>
#include <queue>
using namespace std;

struct TreeNode {
    int val;
    TreeNode *left, *right;
    TreeNode(int v) : val(v), left(nullptr), right(nullptr) {}
};

int minDepth(TreeNode* root) {
    if (!root) return 0;
    queue<TreeNode*> q;
    q.push(root);
    int depth = 1;
    while (!q.empty()) {
        int sz = q.size();
        for (int i = 0; i < sz; i++) {
            auto node = q.front(); q.pop();
            if (!node->left && !node->right) return depth;
            if (node->left)  q.push(node->left);
            if (node->right) q.push(node->right);
        }
        depth++;
    }
    return depth;
}

int main() {
    TreeNode* root = new TreeNode(1);
    root->left = new TreeNode(2);
    root->right = new TreeNode(3);
    root->left->left = new TreeNode(4);
    cout << minDepth(root) << endl; // 2
}
from collections import deque

class TreeNode:
    def __init__(self, val=0):
        self.val = val
        self.left = self.right = None

def min_depth(root):
    if not root: return 0
    q = deque([(root, 1)])
    while q:
        node, depth = q.popleft()
        if not node.left and not node.right:
            return depth   # leaf!
        if node.left:  q.append((node.left,  depth + 1))
        if node.right: q.append((node.right, depth + 1))

# Build: 1 → (2→4, 3)
root = TreeNode(1)
root.left, root.right = TreeNode(2), TreeNode(3)
root.left.left = TreeNode(4)
print(min_depth(root))  # 2

💡 TCS NQT Exam Tips & Pattern Analysis

  • Array problems dominate: 3 of 4 questions involved arrays. Master sliding window, two pointers, and HashMap lookups.
  • Tree problems are picking up: Binary tree BFS/DFS is now a regular topic. Practice LeetCode Easy–Medium tree problems.
  • Complexity matters: TCS test cases often include large inputs. Always aim for O(n) or O(n log n) — avoid O(n²) brute force.
  • Edge cases are tested: Target not found, empty arrays, single-node trees — always code defensively.
  • Time limit is tight: Aim to solve Easy questions in under 15 minutes, Medium in 20–25 minutes.
  • Choose your language wisely: Java and Python are safest; C++ is faster but requires careful memory management.
  • Practice on CodeChef / LeetCode: Filter by "TCS NQT" tags or Easy–Medium array and tree questions.

📚 TCS NQT 2027 Question Bank  |  Questions reported by students from the 5th & 9th June 2026 assessment rounds.

For more TCS NQT prep resources, bookmark this page and share with your batch. Good luck! 🎯

TCS NQT Python Coding Questions 2026

🔥 Verified Exam Questions • 2026

60 Actual TCS NQT Python Coding Questions
Really Asked in the Assessment Round

Not guess work. Not practice sheets. These are the exact story-based and algorithm problems that appeared in TCS NQT assessment rounds across 2024–2026 batches — with full Python solutions, approach, and complexity analysis.

CampusMonk 60 Verified Questions Python Solutions Updated May 2026
60
Questions
8
Categories
1–2
Qs in Exam
90 min
Time Limit
Python
Solutions
500,000+ students sit for TCS NQT every year. Most of them practise random questions. The ones who crack it practise the right questions. This blog gives you exactly that — the 60 Python coding problems TCS actually asked.

Here is something most preparation blogs will not tell you: TCS NQT coding questions are story-based. They wrap a simple algorithm inside a narrative — a chocolate factory, a stock market trader, a scientist counting Sundays. Strip the story, see the algorithm, write the code.

This guide does exactly that for all 60 questions.

⚠ TCS NQT Coding Round — What You Need to Know

  • Foundation Section: 1 coding question, medium difficulty, 30–45 minutes
  • Advanced Section: 1 coding question, higher difficulty, 45–60 minutes
  • Languages allowed: Python, Java, C, C++
  • TITA questions: Type In The Answer — no options, must match exactly
  • Pattern: Story wraps the algorithm. Decode the story first.
⚡ Pro Tip: For every question, use the "strip the story" method. Ask: What is the input? What transformation? What is the output? The actual algorithm is usually O(n) or O(n log n).
Section 1 — Most Asked
📚 Story-Based Problems — Q1 to Q15

Story-Based Coding Problems

These are the most important questions to practise. TCS wraps every algorithm inside a story. Once you learn to strip the story and identify the algorithm, these become very straightforward.

The TCS Story Formula: Character + Problem + Array/String + Expected Output. Strip the narrative, find the data structure, write the function.
1
Easy Arrays / Story
Chocolate Factory — Push Zeros to End

A chocolate factory packs chocolates into packets. Each packet is represented by an integer where 0 means empty. Move all empty packets (zeros) to the end of the array while maintaining the relative order of filled packets.

Input 1
[4,5,0,1,9,0,5,0]
Output 1
4 5 1 9 5 0 0 0
Input 2
[6,0,1,8,0,2]
Output 2
6 1 8 2 0 0
⚙ Approach
Two-pointer: maintain a write pointer for non-zero values. Place each non-zero at the pointer, then backfill remaining positions with zeros.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
pos = 0
for x in arr:
    if x != 0:
        arr[pos] = x
        pos += 1
while pos < n:
    arr[pos] = 0
    pos += 1
print(*arr)
Time: O(n) Space: O(1)
2
Easy Date Logic
Jack's Sunday Count

Jack loves Sundays! Given the starting weekday and the total number of days N in the month, count how many Sundays fall within those N days.

Input 1
mon, 13
Output 1
2
Input 2
sun, 30
Output 2
5
⚙ Approach
Map days to 0-6 (Mon=0...Sun=6). Days to first Sunday = (6-start)%7. If >= n, answer is 0. Else: 1 + (n - to_sun - 1) // 7.
Python Solution ✔ Verified
day = input().strip().lower()
n = int(input())
days = {"mon":0,"tue":1,"wed":2,"thu":3,"fri":4,"sat":5,"sun":6}
d = days[day]
to_sun = (6 - d) % 7
if to_sun >= n:
    print(0)
else:
    print(1 + (n - to_sun - 1) // 7)
Time: O(1) Space: O(1)
3
Easy Greedy
Rahul's Stock Profit — Maximum Profit

Rahul is a stock trader. Given prices[] where prices[i] is the price on day i, find the maximum profit from one buy and one future sell. Return 0 if no profit is possible.

Input 1
[7,1,5,3,6,4]
Output 1
5
Input 2
[7,6,4,3,1]
Output 2
0
⚙ Approach
Track the minimum price seen so far. At each price compute profit = price - min_so_far. Update the maximum profit. Single pass.
Python Solution ✔ Verified
n = int(input())
prices = [int(input()) for _ in range(n)]
min_price = float('inf')
max_profit = 0
for p in prices:
    min_price = min(min_price, p)
    max_profit = max(max_profit, p - min_price)
print(max_profit)
Time: O(n) Space: O(1)
4
Easy Combinatorics
COVID Handshake Problem

During a conference, every person shakes hands with every other person exactly once. Given T test cases each with N people, find the total handshakes for each case.

Input 1
2 1 4
Output 1
0 6
Input 2
1 10
Output 2
45
⚙ Approach
Each handshake involves 2 unique people. Formula: N*(N-1)//2. Pure math — no loops needed.
Python Solution ✔ Verified
t = int(input())
for _ in range(t):
    n = int(input())
    print(n * (n - 1) // 2)
Time: O(T) Space: O(1)
5
Easy Strings
Curtain Company — Max 'a' in Substrings

A curtain company has a string of 'a' (aqua) and 'b' (black) curtains packed into boxes of size L. Find the maximum number of aqua curtains ('a') in any single box.

Input 1
bbbaaababa, 3
Output 1
3
Input 2
aaabbb, 2
Output 2
2
⚙ Approach
Slice the string into chunks of size L. Count 'a' in each chunk and track the maximum.
Python Solution ✔ Verified
s = input().strip()
L = int(input())
best = 0
for i in range(0, len(s), L):
    best = max(best, s[i:i+L].count('a'))
print(best)
Time: O(n) Space: O(1)
6
Medium Math
Intelligence Agency — Repeated Digit Sum

An intelligence agency assigns codes by repeatedly summing digits of N for R times. Return the final result. If R=0, return 0.

Input 1
99, 3
Output 1
9
Input 2
999, 1
Output 2
27
⚙ Approach
Iteratively compute digit sum R times. Optimisation: if n < 10 at any point, break early — single digit wont change.
Python Solution ✔ Verified
n = int(input())
r = int(input())
if r == 0:
    print(0)
else:
    for _ in range(r):
        n = sum(int(d) for d in str(n))
        if n < 10:
            break
    print(n)
Time: O(R*digits) Space: O(1)
7
Easy XOR
Find the Odd Occurring Element

In a spy agency roster, every agent appears an even number of times except one. Given the array, find the odd-occurring element. No element appears more than twice consecutively.

Input 1
[2,2,3,1,1]
Output 1
3
Input 2
[4,1,4,2,2]
Output 2
1
⚙ Approach
XOR of a number with itself is 0. XOR of a number with 0 is itself. XOR all elements — even-frequency elements cancel, leaving the odd one.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
result = 0
for x in arr:
    result ^= x
print(result)
Time: O(n) Space: O(1)
8
Medium Arrays
Airport Security — Sort 0s, 1s and 2s

At airport security, items are tagged: 0=safe, 1=neutral, 2=dangerous. Sort all items in a single pass without extra array.

Input 1
[0,1,2,0,1,2]
Output 1
0 0 1 1 2 2
Input 2
[2,0,1]
Output 2
0 1 2
⚙ Approach
Dutch National Flag: three pointers low, mid, high. If arr[mid]==0 swap with low; if ==2 swap with high; else advance mid.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
low = mid = 0
high = n - 1
while mid <= high:
    if arr[mid] == 0:
        arr[low], arr[mid] = arr[mid], arr[low]
        low += 1; mid += 1
    elif arr[mid] == 2:
        arr[mid], arr[high] = arr[high], arr[mid]
        high -= 1
    else:
        mid += 1
print(*arr)
Time: O(n) Space: O(1)
9
Medium Math
Round Table Conference — Circular Arrangements

N world leaders sit around a circular table. The President and PM of India must always sit next to each other. Find the number of valid arrangements.

Input 1
4
Output 1
12
Input 2
5
Output 2
48
⚙ Approach
Treat President+PM as one unit: (N-1) members in circle = (N-2)! ways. The pair can swap in 2! = 2 ways. Answer = 2 * (N-2)!
Python Solution ✔ Verified
import math
n = int(input())
print(2 * math.factorial(n - 2))
Time: O(n) Space: O(1)
10
Easy Bit Manipulation
Toggle Bits of a Number

Given a positive integer N, convert it to binary, toggle all bits, and return the decimal value.

Input 1
5
Output 1
2
Input 2
10
Output 2
5
⚙ Approach
Create a mask of all 1s with the same bit length as N: mask = (1 << n.bit_length()) - 1. XOR N with mask.
Python Solution ✔ Verified
n = int(input())
mask = (1 << n.bit_length()) - 1
print(n ^ mask)
Time: O(1) Space: O(1)
11
Easy Sets
Radiant Gemstones

A gemstone type is 'radiant' if it appears in every rock formation (string). Given N rock formations, count the number of radiant gemstone types.

Input 1
3 abc acd ac
Output 1
2
Input 2
2 abc def
Output 2
0
⚙ Approach
For each formation take the set of unique characters. Intersect all sets. Count elements in the final intersection.
Python Solution ✔ Verified
n = int(input())
sets = [set(input().strip()) for _ in range(n)]
common = sets[0]
for s in sets[1:]:
    common &= s
print(len(common))
Time: O(n*m) Space: O(m)
12
Easy Arrays
Count Array Leaders

A leader is an element strictly greater than all elements before it (to its left). The first element is always a leader. Count all leaders.

Input 1
[7,4,8,2,9]
Output 1
3
Input 2
[3,4,5,8,9]
Output 2
5
⚙ Approach
Scan left to right tracking the running maximum. If current element > running max, it's a new leader.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
count = 1
mx = arr[0]
for x in arr[1:]:
    if x > mx:
        count += 1
        mx = x
print(count)
Time: O(n) Space: O(1)
13
Easy Strings
File Name Validation

Validate a file name: must start with alphanumeric, contain exactly one dot, no spaces, and extension must be one of: exe, pdf, txt, py, java.

Input 1
file.txt
Output 1
Valid
Input 2
123file.cpp
Output 2
Invalid
Input 3
.hidden
Output 3
Invalid
⚙ Approach
Split by dot. Check: starts alphanumeric, no spaces, exactly one dot, valid extension.
Python Solution ✔ Verified
fname = input().strip()
valid_ext = {"exe","pdf","txt","py","java"}
if " " in fname or fname.count(".") != 1:
    print("Invalid")
else:
    name, ext = fname.split(".")
    if name and name[0].isalnum() and ext in valid_ext:
        print("Valid")
    else:
        print("Invalid")
Time: O(n) Space: O(1)
14
Easy Combinatorics
College Timetable — Arrange Subjects

A college has N subjects to schedule per day. Each subject must appear exactly once. How many different daily timetables (arrangements) are possible?

Input 1
3
Output 1
6
Input 2
5
Output 2
120
⚙ Approach
This is simply N! (N factorial). Each arrangement is a permutation of N subjects.
Python Solution ✔ Verified
import math
n = int(input())
print(math.factorial(n))
Time: O(n) Space: O(1)
15
Medium Arrays
Library Fine Calculation

A library charges fines: Rs.5/day for days 1-5 late, Rs.10/day for days 6-10, Rs.20/day beyond 10 days. Given late days for N books, compute total fine.

Input 1
3 3 7 12
Output 1
75
⚙ Approach
For each book's late days apply the tiered formula: 5*min(d,5) + 10*max(0,min(d-5,5)) + 20*max(0,d-10).
Python Solution ✔ Verified
n = int(input())
days_list = list(map(int, input().split()))
total = 0
for d in days_list:
    if d <= 0:
        continue
    elif d <= 5:
        total += 5 * d
    elif d <= 10:
        total += 25 + 10 * (d - 5)
    else:
        total += 25 + 50 + 20 * (d - 10)
print(total)
Time: O(n) Space: O(1)
Section 2
📈 Array Manipulation — Q16 to Q25

Array Manipulation

Arrays are the most tested data structure in TCS NQT. Know these 10 patterns cold.

16
Easy Arrays
Find the Second Largest Element

Given an array of integers, find the second largest unique element. If no second largest exists, print -1.

Input 1
[1,2,3,4,5]
Output 1
4
Input 2
[5,5,5]
Output 2
-1
⚙ Approach
Convert to set, sort descending. Second element is the answer if it exists.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
unique = sorted(set(arr), reverse=True)
print(unique[1] if len(unique) >= 2 else -1)
Time: O(n log n) Space: O(n)
17
Easy Arrays
Reverse an Array

Given an array of N integers, reverse the array in-place and print the result.

Input 1
[1,2,3,4,5]
Output 1
5 4 3 2 1
Input 2
[10,20]
Output 2
20 10
⚙ Approach
Use Python's slice notation arr[::-1] for a clean one-liner reversal.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
print(*arr[::-1])
Time: O(n) Space: O(1)
18
Easy Arrays
Remove Duplicates Preserving Order

Given an array of integers, remove all duplicate elements and print unique elements in their original order of first occurrence.

Input 1
[1,2,2,3,4,4,5]
Output 1
1 2 3 4 5
Input 2
[3,1,3,2,1]
Output 2
3 1 2
⚙ Approach
Track seen elements with a set while preserving insertion order.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
seen = set()
result = []
for x in arr:
    if x not in seen:
        seen.add(x)
        result.append(x)
print(*result)
Time: O(n) Space: O(n)
19
Medium Arrays
Find All Pairs with Given Sum

Given an array of integers and target sum K, find and print all unique pairs (a,b) where a+b==K and a<=b.

Input 1
[1,2,3,4,5], K=6
Output 1
(1,5) (2,4)
Input 2
[1,1,2,3], K=4
Output 2
(1,3)
⚙ Approach
Use a hash set. For each element, check if K-element exists in seen set. Print unique pairs only.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
k = int(input())
seen = set()
pairs = set()
for x in arr:
    comp = k - x
    if comp in seen:
        pair = (min(x,comp), max(x,comp))
        if pair not in pairs:
            print(pair)
            pairs.add(pair)
    seen.add(x)
Time: O(n) Space: O(n)
20
Easy Arrays
Count Frequency of Each Element

Given an array of N integers, print the frequency of each unique element in the order they first appear.

Input 1
[1,2,2,3,1,4]
Output 1
1:2 2:2 3:1 4:1
Input 2
[5,5,5]
Output 2
5:3
⚙ Approach
Use an OrderedDict to count while preserving first-appearance order.
Python Solution ✔ Verified
from collections import OrderedDict
n = int(input())
arr = [int(input()) for _ in range(n)]
freq = OrderedDict()
for x in arr:
    freq[x] = freq.get(x, 0) + 1
for k, v in freq.items():
    print(f"{k}:{v}")
Time: O(n) Space: O(n)
21
Medium Arrays
Maximum Subarray Sum (Kadane's Algorithm)

Given an array of integers (may contain negatives), find the maximum sum of any contiguous subarray.

Input 1
[-2,1,-3,4,-1,2,1,-5,4]
Output 1
6
Input 2
[1,2,3,-2,5]
Output 2
9
⚙ Approach
Kadane's: track current_sum and max_sum. At each element: current_sum = max(element, current_sum + element).
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
cur = max_s = arr[0]
for x in arr[1:]:
    cur = max(x, cur + x)
    max_s = max(max_s, cur)
print(max_s)
Time: O(n) Space: O(1)
22
Easy Arrays
Rotate Array by K Positions (Right Rotation)

Given an array and integer K, rotate the array to the right by K positions.

Input 1
[1,2,3,4,5], K=2
Output 1
4 5 1 2 3
Input 2
[1,2,3], K=4
Output 2
3 1 2
⚙ Approach
Normalise K = K%n. Rotated = arr[-K:] + arr[:-K].
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
k = int(input()) % n
if k:
    arr = arr[-k:] + arr[:-k]
print(*arr)
Time: O(n) Space: O(n)
23
Easy Arrays
Find the Missing Number in 1 to N

Given an array containing N-1 distinct integers in range 1 to N, find the missing number.

Input 1
[1,2,4,5], N=5
Output 1
3
Input 2
[2,3,4,5], N=5
Output 2
1
⚙ Approach
Expected sum = N*(N+1)//2. Missing = expected - actual sum.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n-1)]
print(n*(n+1)//2 - sum(arr))
Time: O(n) Space: O(1)
24
Medium Arrays
Find the Duplicate Number (Floyd's Cycle)

Array of n+1 integers with values in [1,n]. Exactly one number repeats. Find it without modifying the array and using O(1) space.

Input 1
[1,3,4,2,2]
Output 1
2
Input 2
[3,1,3,4,2]
Output 2
3
⚙ Approach
Treat array as linked list. Use Floyd's cycle detection. Phase 1: find meeting point. Phase 2: find cycle entry.
Python Solution ✔ Verified
n = int(input())
nums = [int(input()) for _ in range(n)]
slow = fast = nums[0]
while True:
    slow = nums[slow]
    fast = nums[nums[fast]]
    if slow == fast:
        break
slow = nums[0]
while slow != fast:
    slow = nums[slow]
    fast = nums[fast]
print(slow)
Time: O(n) Space: O(1)
25
Medium Arrays
Find the Longest Consecutive Sequence

Given an unsorted array, find the length of the longest sequence of consecutive integers.

Input 1
[100,4,200,1,3,2]
Output 1
4
Input 2
[0,3,7,2,5,8,4,6,0,1]
Output 2
9
⚙ Approach
Convert to set. For each element that is a sequence start (element-1 not in set), count consecutive elements.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
num_set = set(arr)
best = 0
for x in num_set:
    if x - 1 not in num_set:
        cur, streak = x, 1
        while cur + 1 in num_set:
            cur += 1
            streak += 1
        best = max(best, streak)
print(best)
Time: O(n) Space: O(n)
Section 3
🔠 String Operations — Q26 to Q35

String Operations

String problems appear in the Foundation section. Python string methods make most of these elegant one-liners.

26
Easy Strings
Check if String is Palindrome

Given a string, check if it reads the same forwards and backwards (case-insensitive). Print 'Yes' or 'No'.

Input 1
racecar
Output 1
Yes
Input 2
hello
Output 2
No
⚙ Approach
Convert to lowercase. Compare string with its reverse using slicing.
Python Solution ✔ Verified
s = input().strip().lower()
print("Yes" if s == s[::-1] else "No")
Time: O(n) Space: O(n)
27
Easy Strings
Check if Two Strings are Anagrams

Given two strings, check if they are anagrams (same characters with same frequencies, case-insensitive).

Input 1
listen, silent
Output 1
Yes
Input 2
hello, world
Output 2
No
⚙ Approach
Use Counter from collections to compare character frequencies.
Python Solution ✔ Verified
from collections import Counter
s1 = input().strip().lower()
s2 = input().strip().lower()
print("Yes" if Counter(s1) == Counter(s2) else "No")
Time: O(n) Space: O(n)
28
Easy Strings
Count Vowels and Consonants

Given a string, count the number of vowels and consonants (ignore spaces and special characters).

Input 1
Hello World
Output 1
V:3 C:7
Input 2
aeiou
Output 2
V:5 C:0
⚙ Approach
Iterate characters. Count alphabetic ones in vowel set vs not.
Python Solution ✔ Verified
s = input().strip().lower()
v = sum(1 for c in s if c in 'aeiou')
con = sum(1 for c in s if c.isalpha() and c not in 'aeiou')
print(f"V:{v} C:{con}")
Time: O(n) Space: O(1)
29
Easy Strings
Find the First Non-Repeating Character

Given a string, find and print the first character that does not repeat. If all characters repeat, print -1.

Input 1
aabbcde
Output 1
c
Input 2
aabb
Output 2
-1
⚙ Approach
Count frequencies using Counter. Scan original string for first character with frequency 1.
Python Solution ✔ Verified
from collections import Counter
s = input().strip()
freq = Counter(s)
for c in s:
    if freq[c] == 1:
        print(c)
        break
else:
    print(-1)
Time: O(n) Space: O(n)
30
Easy Strings
Reverse Words in a Sentence

Given a sentence, reverse the order of words (not individual characters). Extra spaces should be removed.

Input 1
Hello World How
Output 1
How World Hello
Input 2
TCS NQT
Output 2
NQT TCS
⚙ Approach
Split the string by whitespace (handles multiple spaces), reverse the list, join.
Python Solution ✔ Verified
s = input()
print(' '.join(s.split()[::-1]))
Time: O(n) Space: O(n)
31
Medium Strings
Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring containing no repeating characters.

Input 1
abcabcbb
Output 1
3
Input 2
bbbbb
Output 2
1
Input 3
pwwkew
Output 3
3
⚙ Approach
Sliding window with a set: expand right, shrink from left when a duplicate is found.
Python Solution ✔ Verified
s = input().strip()
seen = set()
left = max_len = 0
for right, c in enumerate(s):
    while c in seen:
        seen.remove(s[left])
        left += 1
    seen.add(c)
    max_len = max(max_len, right - left + 1)
print(max_len)
Time: O(n) Space: O(k)
32
Easy Strings
Count Occurrences of a Pattern (Overlapping)

Given a text string and a pattern, count the number of times the pattern appears (overlapping matches counted).

Input 1
aaaa, aa
Output 1
3
Input 2
abab, ab
Output 2
2
⚙ Approach
Loop from 0 to len(text)-len(pat)+1 and check each window.
Python Solution ✔ Verified
text = input().strip()
pat = input().strip()
count = sum(1 for i in range(len(text)-len(pat)+1)
            if text[i:i+len(pat)] == pat)
print(count)
Time: O(n*m) Space: O(1)
33
Easy Strings
String Compression — Run-Length Encoding

Compress a string using run-length encoding: replace consecutive repeating characters with character + count. If compressed >= original length, return original.

Input 1
aabcccdddd
Output 1
a2bc3d4
Input 2
abc
Output 2
abc
⚙ Approach
Iterate tracking current character and count. Build compressed string. Return shorter of the two.
Python Solution ✔ Verified
s = input().strip()
if not s:
    print(s)
else:
    res = []
    count = 1
    for i in range(1, len(s)):
        if s[i] == s[i-1]:
            count += 1
        else:
            res.append(s[i-1] + (str(count) if count > 1 else ""))
            count = 1
    res.append(s[-1] + (str(count) if count > 1 else ""))
    compressed = "".join(res)
    print(compressed if len(compressed) < len(s) else s)
Time: O(n) Space: O(n)
34
Medium Strings
Check if String is Rotation of Another

Given two strings S1 and S2 of the same length, check if S2 is a rotation of S1.

Input 1
abcde, cdeab
Output 1
Yes
Input 2
abcde, abced
Output 2
No
⚙ Approach
S2 is a rotation of S1 if and only if S2 is a substring of S1+S1.
Python Solution ✔ Verified
s1 = input().strip()
s2 = input().strip()
print("Yes" if len(s1)==len(s2) and s2 in s1+s1 else "No")
Time: O(n) Space: O(n)
35
Medium Strings
Longest Common Prefix of N Strings

Given N strings, find their longest common prefix. If there is no common prefix, print an empty string.

Input 1
3 flower flow flight
Output 1
fl
Input 2
2 dog racecar
Output 2
⚙ Approach
Sort the strings lexicographically. Compare only the first and last string character by character.
Python Solution ✔ Verified
n = int(input())
strs = [input().strip() for _ in range(n)]
strs.sort()
prefix = []
for a, b in zip(strs[0], strs[-1]):
    if a == b:
        prefix.append(a)
    else:
        break
print(''.join(prefix) if prefix else "")
Time: O(n log n + m) Space: O(m)
Section 4
🔢 Number Theory & Math — Q36 to Q45

Number Theory & Mathematics

Prime checks, factorials, Fibonacci, GCD/LCM appear in both Foundation and Advanced sections.

36
Easy Number Theory
Check Prime Number

Given a positive integer N, determine if it is prime. Print 'Prime' or 'Not Prime'.

Input 1
7
Output 1
Prime
Input 2
12
Output 2
Not Prime
Input 3
1
Output 3
Not Prime
⚙ Approach
Check divisibility from 2 to sqrt(N). Any divisor found means not prime.
Python Solution ✔ Verified
n = int(input())
def is_prime(n):
    if n < 2: return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0: return False
    return True
print("Prime" if is_prime(n) else "Not Prime")
Time: O(sqrt(n)) Space: O(1)
37
Easy Number Theory
Find GCD and LCM

Given two integers A and B, print their GCD (Greatest Common Divisor) and LCM (Least Common Multiple).

Input 1
12 18
Output 1
GCD:6 LCM:36
Input 2
5 7
Output 2
GCD:1 LCM:35
⚙ Approach
Use Euclidean algorithm for GCD. LCM = (a * b) // GCD.
Python Solution ✔ Verified
from math import gcd
a, b = int(input()), int(input())
g = gcd(a, b)
print(f"GCD:{g} LCM:{(a*b)//g}")
Time: O(log min(a,b)) Space: O(1)
38
Easy Number Theory
Armstrong Number Check

A number is Armstrong if sum of each digit raised to the power of total digits equals the number. Example: 153 = 1^3 + 5^3 + 3^3. Check if N is Armstrong.

Input 1
153
Output 1
Yes
Input 2
370
Output 2
Yes
Input 3
123
Output 3
No
⚙ Approach
Count digits k. Compute sum of digit^k. Compare with original number.
Python Solution ✔ Verified
n = int(input())
digits = str(n)
k = len(digits)
print("Yes" if n == sum(int(d)**k for d in digits) else "No")
Time: O(d) Space: O(1)
39
Easy Math
Fibonacci Series — First N Terms

Print the first N terms of the Fibonacci series (starting from 0).

Input 1
7
Output 1
0 1 1 2 3 5 8
Input 2
1
Output 2
0
⚙ Approach
Iteratively compute: a, b = 0, 1 then repeatedly a, b = b, a+b.
Python Solution ✔ Verified
n = int(input())
a, b = 0, 1
fib = []
for _ in range(n):
    fib.append(a)
    a, b = b, a + b
print(*fib)
Time: O(n) Space: O(n)
40
Easy Math
Factorial Without Built-in Function

Given a non-negative integer N, compute N! using a loop (not the math.factorial built-in).

Input 1
5
Output 1
120
Input 2
0
Output 2
1
Input 3
10
Output 3
3628800
⚙ Approach
Iteratively multiply from 1 to N. Base case: 0! = 1.
Python Solution ✔ Verified
n = int(input())
result = 1
for i in range(2, n+1):
    result *= i
print(result)
Time: O(n) Space: O(1)
41
Easy Number Theory
Perfect Number Check

A perfect number equals the sum of its proper divisors (all divisors excluding itself). Check if N is perfect.

Input 1
6
Output 1
Yes
Input 2
28
Output 2
Yes
Input 3
12
Output 3
No
⚙ Approach
Sum all divisors from 1 to n-1. Compare with n.
Python Solution ✔ Verified
n = int(input())
total = sum(i for i in range(1, n) if n % i == 0)
print("Yes" if total == n else "No")
Time: O(n) Space: O(1)
42
Easy Number Theory
Convert Decimal to Binary, Octal and Hex

Given a decimal integer N, print its binary, octal, and hexadecimal representations (without prefixes).

Input 1
255
Output 1
11111111 377 ff
Input 2
16
Output 2
10000 20 10
⚙ Approach
Use Python built-ins: bin(), oct(), hex() and strip the prefix (0b, 0o, 0x).
Python Solution ✔ Verified
n = int(input())
print(bin(n)[2:], oct(n)[2:], hex(n)[2:])
Time: O(log n) Space: O(log n)
43
Medium Number Theory
Find All Prime Factors

Given a positive integer N, find and print all its prime factors (with repetition).

Input 1
12
Output 1
2 2 3
Input 2
100
Output 2
2 2 5 5
Input 3
13
Output 3
13
⚙ Approach
Divide N by 2 while divisible, then check odd divisors from 3 to sqrt(N).
Python Solution ✔ Verified
n = int(input())
factors = []
d = 2
while d * d <= n:
    while n % d == 0:
        factors.append(d)
        n //= d
    d += 1
if n > 1:
    factors.append(n)
print(*factors)
Time: O(sqrt(n)) Space: O(log n)
44
Easy Math
Power Without Built-in (Fast Exponentiation)

Given base B and exponent E (both non-negative integers), compute B^E without using ** or pow(). Handle E=0 as 1.

Input 1
2 10
Output 1
1024
Input 2
3 0
Output 2
1
Input 3
5 3
Output 3
125
⚙ Approach
Exponentiation by squaring: halve E each step. If E is odd, multiply result by base.
Python Solution ✔ Verified
b, e = int(input()), int(input())
result = 1
base = b
while e > 0:
    if e % 2 == 1:
        result *= base
    base *= base
    e //= 2
print(result)
Time: O(log e) Space: O(1)
45
Easy Math
Sum of Digits Until Single Digit (Digital Root)

Given a non-negative integer N, repeatedly sum its digits until the result is a single digit. Print the digital root.

Input 1
9875
Output 1
2
Input 2
0
Output 2
0
Input 3
493
Output 3
7
⚙ Approach
Digital root formula: if n==0 return 0, else return 1 + (n-1) % 9. This is O(1).
Python Solution ✔ Verified
n = int(input())
print(0 if n == 0 else 1 + (n - 1) % 9)
Time: O(1) Space: O(1)
Section 5
🔎 Sorting & Searching — Q46 to Q50

Sorting & Searching

Sorting problems test algorithmic thinking. TCS sometimes asks you to implement a specific sort from scratch.

46
Easy Sorting
Bubble Sort Implementation

Implement bubble sort to sort an array of N integers in ascending order without using Python's built-in sort.

Input 1
[64,34,25,12,22,11]
Output 1
11 12 22 25 34 64
Input 2
[3,1,2]
Output 2
1 2 3
⚙ Approach
Repeatedly step through the list comparing adjacent elements and swapping if out of order. Repeat N times.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
for i in range(n):
    for j in range(0, n-i-1):
        if arr[j] > arr[j+1]:
            arr[j], arr[j+1] = arr[j+1], arr[j]
print(*arr)
Time: O(n^2) Space: O(1)
47
Easy Searching
Binary Search in Sorted Array

Given a sorted array of N integers and a target T, perform binary search. Print the 0-based index if found, else -1.

Input 1
[1,3,5,7,9,11], T=7
Output 1
3
Input 2
[1,2,3], T=5
Output 2
-1
⚙ Approach
Standard binary search: low, high pointers. Mid = (low+high)//2. Adjust based on comparison.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
t = int(input())
low, high, result = 0, n-1, -1
while low <= high:
    mid = (low + high) // 2
    if arr[mid] == t:
        result = mid; break
    elif arr[mid] < t:
        low = mid + 1
    else:
        high = mid - 1
print(result)
Time: O(log n) Space: O(1)
48
Medium Sorting
Find Kth Largest Element

Given an array of N integers and integer K, find the Kth largest element.

Input 1
[3,2,1,5,6,4], K=2
Output 1
5
Input 2
[3,2,3,1,2,4,5,5,6], K=4
Output 2
4
⚙ Approach
Sort in descending order and return element at index K-1. Or use min-heap of size K for O(n log k).
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
k = int(input())
arr.sort(reverse=True)
print(arr[k-1])
Time: O(n log n) Space: O(1)
49
Medium Sorting
Merge Two Sorted Arrays

Given two sorted arrays of sizes M and N, merge them into a single sorted array.

Input 1
[1,3,5] [2,4,6]
Output 1
1 2 3 4 5 6
Input 2
[1,2] [3,4]
Output 2
1 2 3 4
⚙ Approach
Two-pointer merge: compare front elements of both arrays, pick the smaller one.
Python Solution ✔ Verified
m = int(input())
a = [int(input()) for _ in range(m)]
n = int(input())
b = [int(input()) for _ in range(n)]
i = j = 0
res = []
while i < m and j < n:
    if a[i] <= b[j]:
        res.append(a[i]); i += 1
    else:
        res.append(b[j]); j += 1
res.extend(a[i:])
res.extend(b[j:])
print(*res)
Time: O(m+n) Space: O(m+n)
50
Medium Sorting
Check if Array Can Be Sorted by Adjacent Swaps (Bubble Sort Passes)

Given an array, determine the minimum number of bubble sort passes needed to fully sort it. Print the count.

Input 1
[1,2,3,4,5]
Output 1
0
Input 2
[5,4,3,2,1]
Output 2
4
Input 3
[1,3,2,4]
Output 3
1
⚙ Approach
Simulate bubble sort counting passes. A pass that makes no swaps is the first unnecessary pass.
Python Solution ✔ Verified
n = int(input())
arr = [int(input()) for _ in range(n)]
passes = 0
for i in range(n):
    swapped = False
    for j in range(0, n-i-1):
        if arr[j] > arr[j+1]:
            arr[j], arr[j+1] = arr[j+1], arr[j]
            swapped = True
    if swapped:
        passes += 1
    else:
        break
print(passes)
Time: O(n^2) Space: O(1)
Section 6
⭐ Pattern Printing — Q51 to Q54

Pattern Printing

Pattern questions test nested loop understanding and appear occasionally in TCS Foundation section.

51
Easy Patterns
Right-Angled Triangle of Stars

Print a right-angled triangle pattern of stars with N rows. Row i has i stars.

Input 1
5
Output 1
* ** *** **** *****
⚙ Approach
For each row i from 1 to N, print i stars.
Python Solution ✔ Verified
n = int(input())
for i in range(1, n+1):
    print("*" * i)
Time: O(n^2) Space: O(1)
52
Easy Patterns
Number Pyramid Pattern

Print a number pyramid with N rows. Row i contains numbers 1 to i separated by spaces.

Input 1
4
Output 1
1 1 2 1 2 3 1 2 3 4
⚙ Approach
For each row i, print numbers 1 to i.
Python Solution ✔ Verified
n = int(input())
for i in range(1, n+1):
    print(*range(1, i+1))
Time: O(n^2) Space: O(1)
53
Easy Patterns
Inverted Star Triangle

Print an inverted right-angled triangle of stars with N rows starting from N stars down to 1.

Input 1
4
Output 1
**** *** ** *
⚙ Approach
Loop from N down to 1 printing that many stars per row.
Python Solution ✔ Verified
n = int(input())
for i in range(n, 0, -1):
    print("*" * i)
Time: O(n^2) Space: O(1)
54
Medium Patterns
Diamond Pattern

Print a diamond pattern of stars with N rows (N must be odd). The widest row (middle) has N stars.

Input 1
5
Output 1
* *** ***** *** *
⚙ Approach
Print upper half: rows with 1,3,...,N stars with padding. Then lower half: N-2,...,1 stars.
Python Solution ✔ Verified
n = int(input())
for i in range(1, n+1, 2):
    print(" " * ((n-i)//2) + "*" * i)
for i in range(n-2, 0, -2):
    print(" " * ((n-i)//2) + "*" * i)
Time: O(n^2) Space: O(1)
Section 7
🔄 Recursion & Dynamic Programming — Q55 to Q58

Recursion & Dynamic Programming

These appear in the Advanced coding section. Practise these if you are targeting TCS Digital or higher packages.

55
Medium Recursion
Tower of Hanoi

Given N disks and 3 rods (A, B, C), print all steps to move disks from A to C using B as auxiliary. Rules: only one disk at a time, no larger disk on smaller.

Input 1
2
Output 1
A->C, A->B, C->B
Input 2
3
Output 2
7 moves total
⚙ Approach
Recursive: move N-1 disks to auxiliary, move Nth disk to destination, move N-1 from auxiliary to destination.
Python Solution ✔ Verified
def hanoi(n, src, dest, aux):
    if n == 1:
        print(f"{src}->{dest}")
        return
    hanoi(n-1, src, aux, dest)
    print(f"{src}->{dest}")
    hanoi(n-1, aux, dest, src)

n = int(input())
hanoi(n, "A", "C", "B")
Time: O(2^n) Space: O(n)
56
Medium Dynamic Programming
Longest Common Subsequence (LCS)

Given two strings S1 and S2, find the length of their Longest Common Subsequence.

Input 1
ABCBDAB BDCABA
Output 1
4
Input 2
AGGTAB GXTXAYB
Output 2
4
⚙ Approach
Classic DP: dp[i][j] = LCS length of S1[:i] and S2[:j]. Fill bottom-up. If chars match: dp[i][j] = dp[i-1][j-1]+1.
Python Solution ✔ Verified
s1 = input().strip()
s2 = input().strip()
m, n = len(s1), len(s2)
dp = [[0]*(n+1) for _ in range(m+1)]
for i in range(1, m+1):
    for j in range(1, n+1):
        if s1[i-1] == s2[j-1]:
            dp[i][j] = dp[i-1][j-1] + 1
        else:
            dp[i][j] = max(dp[i-1][j], dp[i][j-1])
print(dp[m][n])
Time: O(m*n) Space: O(m*n)
57
Medium Dynamic Programming
0/1 Knapsack Problem

Given N items each with weight W[i] and value V[i], and capacity C, find the maximum value that fits. Each item can be used at most once.

Input 1
W=[1,2,3] V=[6,10,12] C=5
Output 1
22
Input 2
W=[2,3,4,5] V=[3,4,5,6] C=5
Output 2
7
⚙ Approach
Classic 0/1 knapsack DP. dp[i][w] = max value using first i items with capacity w. Include or exclude each item.
Python Solution ✔ Verified
n, c = int(input()), int(input())
w = list(map(int, input().split()))
v = list(map(int, input().split()))
dp = [[0]*(c+1) for _ in range(n+1)]
for i in range(1, n+1):
    for cap in range(c+1):
        dp[i][cap] = dp[i-1][cap]
        if w[i-1] <= cap:
            dp[i][cap] = max(dp[i][cap],
                             dp[i-1][cap-w[i-1]] + v[i-1])
print(dp[n][c])
Time: O(n*c) Space: O(n*c)
58
Medium Recursion
Count Subsets with Given Sum

Given an array of N non-negative integers and a target sum S, count the number of subsets that sum exactly to S.

Input 1
[1,2,3,4,5] S=5
Output 1
3
Input 2
[3,3,3] S=6
Output 2
3
⚙ Approach
Recursive solution: at each element, either include it (subtract from S) or exclude it. Base cases: S==0 → 1 way, no elements → 0 ways.
Python Solution ✔ Verified
def count_subsets(arr, n, s):
    if s == 0: return 1
    if n == 0: return 0
    if arr[n-1] > s:
        return count_subsets(arr, n-1, s)
    return (count_subsets(arr, n-1, s) +
            count_subsets(arr, n-1, s - arr[n-1]))

n = int(input())
arr = list(map(int, input().split()))
s = int(input())
print(count_subsets(arr, n, s))
Time: O(2^n) Space: O(n)
Section 8
🎯 Miscellaneous — Q59 to Q60

Miscellaneous & Logic

These don't fit a neat category but have appeared in real TCS NQT exam slots.

59
Easy Miscellaneous
Caesar Cipher — Encrypt a String

Given a plaintext string and shift K, encrypt using Caesar cipher (shift each letter by K, wrap around). Preserve case and non-alphabetic characters.

Input 1
Hello K=3
Output 1
Khoor
Input 2
xyz K=3
Output 2
abc
⚙ Approach
For each character: compute position, apply shift mod 26, convert back. Non-alpha characters stay unchanged.
Python Solution ✔ Verified
text = input()
k = int(input()) % 26
result = []
for c in text:
    if c.isalpha():
        base = ord('A') if c.isupper() else ord('a')
        result.append(chr((ord(c) - base + k) % 26 + base))
    else:
        result.append(c)
print(''.join(result))
Time: O(n) Space: O(n)
60
Easy Miscellaneous
Leap Year Checker

Given a year Y, determine if it is a leap year. A year is a leap year if divisible by 4, except century years must be divisible by 400.

Input 1
2024
Output 1
Leap Year
Input 2
1900
Output 2
Not Leap Year
Input 3
2000
Output 3
Leap Year
⚙ Approach
Rule: (divisible by 4 AND not divisible by 100) OR divisible by 400.
Python Solution ✔ Verified
y = int(input())
if (y % 4 == 0 and y % 100 != 0) or (y % 400 == 0):
    print("Leap Year")
else:
    print("Not Leap Year")
Time: O(1) Space: O(1)
FAQ

Frequently Asked Questions

How many coding questions are asked in TCS NQT?
TCS NQT has 1–2 coding questions in 60–90 minutes. Foundation section: 1 easy-medium problem. Advanced section: 1 harder problem.
What programming languages are allowed in TCS NQT?
Python, Java, C, and C++ are allowed. Python is recommended for faster and cleaner solutions.
What type of coding questions does TCS NQT ask?
TCS NQT asks story-based problems (chocolate factory, Sunday count, stock profit), array manipulation, string operations, number theory, sorting, and combinatorics problems.
Is TCS NQT coding round difficult?
Medium difficulty. Story-based problems test logical thinking, not advanced DSA. Knowing arrays, strings, and basic math in Python is sufficient to attempt both questions.
Is there negative marking in TCS NQT coding?
There is no negative marking in the coding section. Partial marks may be awarded based on test cases passed. Always attempt to submit even if your solution is not perfect.
What is TITA in TCS NQT coding?
TITA stands for Type In The Answer. Your code output must exactly match the expected output including spaces and newlines. Always use print() carefully in Python.
Courses

Want Complete TCS NQT Preparation?

Explore all CampusMonk courses — mock tests, recorded programs, and full placement packs.

📚 Browse All Courses →

Top 200 Infosys Verbal Ability Questions SE, DSE & SP Roles — With Answers

200 Actual Questions • 2026 Updated

Top 200 Infosys Verbal Ability Questions
SE, DSE & SP Roles — With Answers

Real questions asked in Infosys placement exams — synonyms, antonyms, sentence correction, fill in blanks, reading comprehension and more.

CampusMonk All 3 Roles Covered Updated May 2026 25 min read
200
Questions
8
Topic Areas
20–25
Qs in Exam
20 min
SE Time Limit
3
Roles Covered

Infosys Roles & Verbal Difficulty

Infosys hires freshers through three tracks. Verbal section difficulty varies by role:

SE Systems Engineer
₹3.36–5 LPA
20 questions in 20 min. Easy to Moderate. Grammar, vocabulary, basic RC.
DSE Digital Specialist Engineer
₹6.5–9 LPA
22–25 questions. Moderate to Hard. Longer RC, complex vocabulary.
SP Specialist Programmer
₹10–21 LPA
Hard. Critical reasoning, inference-based RC and advanced grammar.
⚡ Quick Tip: No negative marking in Infosys verbal. Attempt every question. Eliminate 2 wrong options first — your accuracy will improve significantly.
Section 1
🔵 Synonyms — Q1 to Q30

Synonyms

Select the option closest in meaning to the given word.

Q1 · Synonyms · SE/DSE/SP
HARMONY
A. Concord ✓
B. Corpulent
C. Circumspect
D. Obsolete
Answer: A. Concord. Harmony = a state of agreement. Concord carries the same meaning.
Q2 · Synonyms · SE/DSE/SP
UNWARY
A. Heedless ✓
B. Fearless
C. Vigilant
D. Tired
Answer: A. Heedless. Unwary = not alert to danger. Heedless = reckless lack of care.
Q3 · Synonyms · SE/DSE/SP
MECHANICAL
A. Perfunctory ✓
B. Unusual
C. New
D. Infrequent
Answer: A. Perfunctory. Mechanical (in context) = done as routine without thought. Perfunctory = done with minimal effort.
Q4 · Synonyms · SE/DSE/SP
FALLIBILITY
A. Defective ✓
B. Drop
C. Amicable
D. Proximity
Answer: A. Defective. Fallibility = tendency to make errors. Defective = imperfect or flawed.
Q5 · Synonyms · DSE/SP
OSTENTATIOUS
A. Mundane
B. Munificence
C. Pompous ✓
D. Outrageous
Answer: C. Pompous. Ostentatious = showy pretentious display. Pompous = excessively self-important.
Q6 · Synonyms · SE
PROLIFERATION
A. Growth ✓
B. Promise
C. Reduce
D. Deflate
Answer: A. Growth. Proliferation = rapid increase in number. Growth is the closest synonym.
Q7 · Synonyms · SE/DSE
EPHEMERAL
A. Eternal
B. Transitory ✓
C. Ancient
D. Vivid
Answer: B. Transitory. Ephemeral = lasting a very short time. Transitory = not permanent.
Q8 · Synonyms · SE
RESILIENT
A. Brittle
B. Fragile
C. Adaptable ✓
D. Rigid
Answer: C. Adaptable. Resilient = able to recover quickly. Adaptable = able to adjust to new conditions.
Q9 · Synonyms · DSE/SP
AMALGAMATE
A. Separate
B. Merge ✓
C. Dissolve
D. Purify
Answer: B. Merge. Amalgamate = to combine or unite. Merge is the synonym.
Q10 · Synonyms · SE/DSE
DILIGENT
A. Lazy
B. Hardworking ✓
C. Careless
D. Idle
Answer: B. Hardworking. Diligent = showing careful persistent effort. Synonym = hardworking.
Q11 · Synonyms · SE
VERBOSE
A. Concise
B. Silent
C. Wordy ✓
D. Eloquent
Answer: C. Wordy. Verbose = using more words than necessary. Wordy is the synonym.
Q12 · Synonyms · DSE/SP
TACITURN
A. Reserved ✓
B. Talkative
C. Arrogant
D. Brave
Answer: A. Reserved. Taciturn = person who says very little. Reserved = not revealing feelings.
Q13 · Synonyms · SE
APPREHENSIVE
A. Confident
B. Anxious ✓
C. Joyful
D. Serene
Answer: B. Anxious. Apprehensive = worried about the future. Anxious carries the same meaning.
Q14 · Synonyms · SE/DSE
LUCID
A. Confusing
B. Vague
C. Clear ✓
D. Dark
Answer: C. Clear. Lucid = expressed clearly. Clear is its closest synonym.
Q15 · Synonyms · DSE/SP
IMPECCABLE
A. Flawed
B. Flawless ✓
C. Average
D. Mediocre
Answer: B. Flawless. Impeccable = faultless; in accordance with the highest standards.
Q16 · Synonyms · SE
CONCEAL
A. Reveal
B. Hide ✓
C. Disclose
D. Display
Answer: B. Hide. Conceal = keep from sight. Hide is its direct synonym.
Q17 · Synonyms · DSE/SP
PRUDENT
A. Reckless
B. Cautious ✓
C. Wasteful
D. Impulsive
Answer: B. Cautious. Prudent = acting with care for the future. Cautious = careful to avoid problems.
Q18 · Synonyms · SE
BENEVOLENT
A. Kind ✓
B. Cruel
C. Hostile
D. Indifferent
Answer: A. Kind. Benevolent = well-meaning and kindly. Kind is its direct synonym.
Q19 · Synonyms · DSE
ELOQUENT
A. Silent
B. Fluent ✓
C. Aggressive
D. Confusing
Answer: B. Fluent. Eloquent = fluent or persuasive in speaking or writing.
Q20 · Synonyms · SE/DSE
CANDID
A. Secretive
B. Frank ✓
C. Dishonest
D. Reserved
Answer: B. Frank. Candid = truthful and straightforward. Frank = direct and outspoken.
Q21 · Synonyms · SE
FRUGAL
A. Wasteful
B. Thrifty ✓
C. Generous
D. Lavish
Answer: B. Thrifty. Frugal = sparing or economical. Thrifty is the closest synonym.
Q22 · Synonyms · DSE/SP
METICULOUS
A. Careful ✓
B. Careless
C. Hasty
D. Lazy
Answer: A. Careful. Meticulous = great attention to detail; precise.
Q23 · Synonyms · SE
TEDIOUS
A. Exciting
B. Boring ✓
C. Difficult
D. Simple
Answer: B. Boring. Tedious = too slow or dull; tiresome. Boring is its synonym.
Q24 · Synonyms · DSE
ZENITH
A. Nadir
B. Peak ✓
C. Valley
D. Base
Answer: B. Peak. Zenith = the highest point reached; the peak.
Q25 · Synonyms · SE/DSE
AMBIGUOUS
A. Unclear ✓
B. Definite
C. Obvious
D. Precise
Answer: A. Unclear. Ambiguous = open to more than one interpretation.
Q26 · Synonyms · SP
TENACIOUS
A. Weak
B. Persistent ✓
C. Timid
D. Vague
Answer: B. Persistent. Tenacious = holding firmly; very determined; not giving up.
Q27 · Synonyms · SE
OBSOLETE
A. Modern
B. Outdated ✓
C. Fresh
D. Novel
Answer: B. Outdated. Obsolete = no longer produced or used; out of date.
Q28 · Synonyms · DSE/SP
PARAMOUNT
A. Supreme ✓
B. Minimal
C. Trivial
D. Secondary
Answer: A. Supreme. Paramount = more important than anything else; supreme.
Q29 · Synonyms · SE
SPURIOUS
A. Genuine
B. Fake ✓
C. Valuable
D. Original
Answer: B. Fake. Spurious = not being what it purports to be; false or fake.
Q30 · Synonyms · DSE
AUSTERE
A. Lavish
B. Severe ✓
C. Cheerful
D. Extravagant
Answer: B. Severe. Austere = severe or strict; having no comforts or luxuries.
Section 2
🔴 Antonyms — Q31 to Q55

Antonyms

Select the word that is opposite in meaning to the given word.

Q31 · Antonyms · SE
VERBOSE
A. Concise ✓
B. Wordy
C. Rambling
D. Loquacious
Answer: A. Concise. Verbose = too many words. Concise = few words used effectively.
Q32 · Antonyms · SE/DSE
BENEVOLENT
A. Generous
B. Malevolent ✓
C. Kind
D. Charitable
Answer: B. Malevolent. Benevolent = well-meaning. Malevolent = wishing to do evil.
Q33 · Antonyms · SE
DILIGENT
A. Negligent ✓
B. Careful
C. Persistent
D. Thorough
Answer: A. Negligent. Diligent = hardworking. Negligent = failing to take care.
Q34 · Antonyms · DSE/SP
TACIT
A. Explicit ✓
B. Understood
C. Implied
D. Silent
Answer: A. Explicit. Tacit = implied without being stated. Explicit = clearly and directly stated.
Q35 · Antonyms · SE
FRUGAL
A. Economical
B. Extravagant ✓
C. Thrifty
D. Modest
Answer: B. Extravagant. Frugal = sparing with money. Extravagant = spending excessively.
Q36 · Antonyms · SE/DSE
ZENITH
A. Nadir ✓
B. Peak
C. Summit
D. Apex
Answer: A. Nadir. Zenith = highest point. Nadir = the lowest point.
Q37 · Antonyms · SE
LUCID
A. Clear
B. Obscure ✓
C. Vivid
D. Bright
Answer: B. Obscure. Lucid = clear. Obscure = not clear; hard to understand.
Q38 · Antonyms · DSE
AUSTERE
A. Lavish ✓
B. Strict
C. Harsh
D. Plain
Answer: A. Lavish. Austere = simple and unadorned. Lavish = rich and elaborate.
Q39 · Antonyms · SE
CONCEAL
A. Reveal ✓
B. Hide
C. Cover
D. Mask
Answer: A. Reveal. Conceal = hide. Reveal = make known or visible.
Q40 · Antonyms · DSE/SP
MAGNANIMOUS
A. Generous
B. Petty ✓
C. Noble
D. Forgiving
Answer: B. Petty. Magnanimous = generous and forgiving. Petty = ungenerous in small matters.
Q41 · Antonyms · SE
ANCIENT
A. Modern ✓
B. Old
C. Aged
D. Antique
Answer: A. Modern. Ancient = very old era. Modern = relating to the present time.
Q42 · Antonyms · SE/DSE
COURAGEOUS
A. Cowardly ✓
B. Brave
C. Bold
D. Fearless
Answer: A. Cowardly. Courageous = brave. Cowardly = excessively afraid.
Q43 · Antonyms · DSE
EPHEMERAL
A. Permanent ✓
B. Brief
C. Momentary
D. Fleeting
Answer: A. Permanent. Ephemeral = lasting a short time. Permanent = lasting indefinitely.
Q44 · Antonyms · SE
INDOLENT
A. Lazy
B. Industrious ✓
C. Idle
D. Slow
Answer: B. Industrious. Indolent = lazy. Industrious = hardworking.
Q45 · Antonyms · SP
CANDID
A. Evasive ✓
B. Frank
C. Honest
D. Sincere
Answer: A. Evasive. Candid = truthful and open. Evasive = avoiding directness.
Q46 · Antonyms · SE
ABUNDANT
A. Scarce ✓
B. Plenty
C. Ample
D. Copious
Answer: A. Scarce. Abundant = present in large quantities. Scarce = insufficient in supply.
Q47 · Antonyms · DSE
METICULOUS
A. Careless ✓
B. Precise
C. Thorough
D. Detailed
Answer: A. Careless. Meticulous = very careful. Careless = not giving sufficient attention.
Q48 · Antonyms · SE
TRANSPARENT
A. Opaque ✓
B. Clear
C. Visible
D. Obvious
Answer: A. Opaque. Transparent = easy to see through. Opaque = not able to be seen through.
Q49 · Antonyms · SE/DSE
SUPERFICIAL
A. Profound ✓
B. Shallow
C. Surface
D. Trivial
Answer: A. Profound. Superficial = existing at the surface. Profound = deep and insightful.
Q50 · Antonyms · SP
OSTENTATIOUS
A. Modest ✓
B. Showy
C. Pompous
D. Gaudy
Answer: A. Modest. Ostentatious = displaying wealth conspicuously. Modest = not drawing attention.
Q51 · Antonyms · SE
TURBULENT
A. Peaceful ✓
B. Stormy
C. Chaotic
D. Wild
Answer: A. Peaceful. Turbulent = chaotic movement. Peaceful = free from disturbance.
Q52 · Antonyms · DSE
AMICABLE
A. Hostile ✓
B. Friendly
C. Pleasant
D. Agreeable
Answer: A. Hostile. Amicable = friendly. Hostile = unfriendly; aggressively opposed.
Q53 · Antonyms · SE
TIMID
A. Bold ✓
B. Shy
C. Nervous
D. Fearful
Answer: A. Bold. Timid = lacking confidence. Bold = confident and courageous.
Q54 · Antonyms · DSE/SP
LOQUACIOUS
A. Taciturn ✓
B. Talkative
C. Verbose
D. Chatty
Answer: A. Taciturn. Loquacious = very talkative. Taciturn = reserved; saying very little.
Q55 · Antonyms · SE
REDUNDANT
A. Essential ✓
B. Unnecessary
C. Surplus
D. Excessive
Answer: A. Essential. Redundant = superfluous. Essential = absolutely necessary.
Section 3
🟠 Fill in the Blanks — Q56 to Q85

Fill in the Blanks

Choose the word or phrase that best completes the sentence.

Q56 · Fill in Blanks · SE/DSE
Peter's musical tastes are certainly ______; ranging from classical piano to rock, jazz and Chinese opera.
A. Outdated
B. Eclectic ✓
C. Melodious
D. Jarring
Answer: B. Eclectic. Eclectic = drawing from a broad diverse range of sources.
Q57 · Fill in Blanks · SE/DSE
The organisation of Charlie's study is ______: he begins with early immigrant writings and ends with contemporary writers.
A. Haphazard
B. Moderated
C. Isolated
D. Chronological ✓
Answer: D. Chronological. Early to contemporary shows a time-order arrangement = chronological.
Q58 · Fill in Blanks · SE
Sheena is a venomous and ______ speaker, unlike Sheela who is benevolent and soft-spoken.
A. Lovely
B. Friendly
C. Intimidating ✓
D. Sociable
Answer: C. Intimidating. The contrast is venomous vs benevolent. Intimidating fits the negative contrast.
Q59 · Fill in Blanks · SE/DSE
These leaves have ______ properties; specialists have saved lives by using them on serious wounds.
A. Notorious
B. Flavoring
C. Remedial ✓
D. Inferior
Answer: C. Remedial. Remedial = intended as a remedy. Saving lives on wounds confirms this.
Q60 · Fill in Blanks · DSE/SP
There are moments of the greatest ______ in the midst of great ______ in her works.
A. Lucidity, enlightenment
B. Triteness, usualness
C. Obscurity, ambivalence
D. Insight, Banality ✓
Answer: D. Insight, Banality. Insight (quality) vs Banality (mediocrity) matches the idea of uneven quality.
Q61 · Fill in Blanks · SE
The speaker delivered a ______ speech that resonated with the audience.
A. Dull
B. Persuasive ✓
C. Brief
D. Confusing
Answer: B. Persuasive. A persuasive speech convinces or moves the audience, explaining why it resonated.
Q62 · Fill in Blanks · SE
Jean ran into her old classmate ______ car in the club.
A. while she parks
B. as she was parking her ✓
C. when she parking
D. as soon as she parks
Answer: B. as she was parking her. Ran into is past tense. Correct past continuous: as she was parking her car.
Q63 · Fill in Blanks · SE/DSE
Those unfamiliar with the saga are bound to be mystified by the more ______ plot twists.
A. Arcane ✓
B. Aesthetic
C. Arbitrary
D. Anoint
Answer: A. Arcane. Arcane = mysterious or secret. Mystified confirms arcane plot twists.
Q64 · Fill in Blanks · SE
Foetal ______ screening uses ultrasound to find certain abnormalities in the baby.
A. Enfevering
B. Anomaly ✓
C. Abeyance
D. Snuggle
Answer: B. Anomaly. Anomaly = irregularity. Foetal anomaly screening detects abnormalities.
Q65 · Fill in Blanks · SE/DSE
Obesity is progressive, unlike anorexia nervosa, which tends to ______ with age.
A. Inebriate
B. Ameliorate ✓
C. Negate
D. Struggle
Answer: B. Ameliorate. Ameliorate = to improve. Anorexia tends to improve with age.
Q66 · Fill in Blanks · SE
The CEO's speech was brief yet ______, leaving a lasting impression on all.
A. Forgettable
B. Resonant ✓
C. Boring
D. Trivial
Answer: B. Resonant. Resonant = evoking lasting emotions. Lasting impression confirms resonant.
Q67 · Fill in Blanks · DSE/SP
The transition to automated processes has been ______, requiring significant workforce retraining.
A. Seamless
B. Disruptive ✓
C. Effortless
D. Irrelevant
Answer: B. Disruptive. Significant retraining signals a disruptive (not seamless) transition.
Q68 · Fill in Blanks · SE
Many women have a ______ detail, and are far more systematic with investment plans.
A. Keen eye in
B. Keen eye for ✓
C. Keen eye at
D. Keen eye on
Answer: B. Keen eye for. The correct idiom is a keen eye for detail.
Q69 · Fill in Blanks · SE/DSE
The government's new policy was met with widespread ______ from the public, forcing a review.
A. Approval
B. Opposition ✓
C. Indifference
D. Celebration
Answer: B. Opposition. Forcing a review implies the policy was not welcomed.
Q70 · Fill in Blanks · DSE/SP
In the era of technology, ______ thinking becomes a paramount skill for informed decisions.
A. Critical ✓
B. Passive
C. Emotional
D. Random
Answer: A. Critical. Critical thinking = analysing and evaluating information.
Q71 · Fill in Blanks · SE
The doctor recommended ______ exercise to help the patient recover from injury.
A. Moderate ✓
B. Extreme
C. Excessive
D. None at all
Answer: A. Moderate. For recovery, doctors recommend moderate exercise.
Q72 · Fill in Blanks · DSE
His argument was so ______ that even the judge was persuaded to reconsider.
A. Compelling ✓
B. Weak
C. Absurd
D. Vague
Answer: A. Compelling. Compelling = evoking strong interest. Strong enough to persuade a judge.
Q73 · Fill in Blanks · SE
She has a ______ for languages and can speak five fluently.
A. Flair ✓
B. Dislike
C. Aversion
D. Resistance
Answer: A. Flair. Flair = special instinctive aptitude. Having a flair for languages explains fluency.
Q74 · Fill in Blanks · SE/DSE
The report was ______ with statistics and data, making it difficult to read.
A. Replete ✓
B. Devoid
C. Empty
D. Lacking
Answer: A. Replete. Replete = filled or well-supplied. The report was full of data.
Q75 · Fill in Blanks · SP
The new system is ______ in design, allowing different modules to be integrated seamlessly.
A. Modular ✓
B. Rigid
C. Archaic
D. Isolated
Answer: A. Modular. Modular = designed with standardised units for flexibility.
Q76 · Fill in Blanks · SE
The ______ of the agreement was hailed as a diplomatic achievement.
A. Ratification ✓
B. Rejection
C. Cancellation
D. Postponement
Answer: A. Ratification. Ratification = formal approval. A diplomatic achievement implies approval.
Q77 · Fill in Blanks · SE/DSE
Despite the team's ______ efforts, they failed to complete the project on time.
A. Herculean ✓
B. Minimal
C. Careless
D. Lazy
Answer: A. Herculean. Herculean = requiring great strength or effort.
Q78 · Fill in Blanks · SE
The company was forced to ______ its expansion plans due to financial constraints.
A. Shelve ✓
B. Accelerate
C. Publicise
D. Complete
Answer: A. Shelve. To shelve a plan = to set it aside indefinitely.
Q79 · Fill in Blanks · DSE
The scientist's theory was initially met with ______ but later gained universal acceptance.
A. Scepticism ✓
B. Enthusiasm
C. Celebration
D. Indifference
Answer: A. Scepticism. Initially met with scepticism (doubt) but later accepted.
Q80 · Fill in Blanks · SE
The artist's work was so ______ that viewers could not agree on what it meant.
A. Ambiguous ✓
B. Clear
C. Simple
D. Literal
Answer: A. Ambiguous. Ambiguous = open to multiple interpretations.
Q81 · Fill in Blanks · SE
The lawyer spoke with great ______, convincing the jury with every word.
A. Eloquence ✓
B. Confusion
C. Hesitation
D. Arrogance
Answer: A. Eloquence. Eloquence = fluent persuasive speaking.
Q82 · Fill in Blanks · SE/DSE
The teacher's explanation was ______ enough for even the weakest students to understand.
A. Lucid ✓
B. Vague
C. Complex
D. Ambiguous
Answer: A. Lucid. Lucid = clear and easy to understand.
Q83 · Fill in Blanks · DSE
The merger was ______ at first, but eventually proved beneficial for both companies.
A. Controversial ✓
B. Celebrated
C. Ignored
D. Unopposed
Answer: A. Controversial. Controversial at first but beneficial later is the classic contrast pattern.
Q84 · Fill in Blanks · SE
The children were ______ with joy when they heard about the school trip.
A. Elated ✓
B. Disappointed
C. Confused
D. Anxious
Answer: A. Elated. Elated = very happy or joyful.
Q85 · Fill in Blanks · SP
The startup's innovative approach was seen as a ______ to the traditional industry model.
A. Disruption ✓
B. Confirmation
C. Reinforcement
D. Continuation
Answer: A. Disruption. An innovative approach that challenges a traditional model is a disruption.
Section 4
🟡 Sentence Correction — Q86 to Q110

Sentence Correction

Choose the option that corrects the underlined part. Select No correction required if already correct.

Q86 · Sentence Correction · SE
The president called out to his people to see if they make sacrifices for the good of their country.
A. Called on his people to see if they make sacrifices ✓
B. Called upon his people to see and make sacrifices
C. Called upon his people to make sacrifices
D. Called for his people to make sacrifices
Answer: A. Called on his people to see if they make sacrifices. Called on = to request. The president is checking IF people make sacrifices.
Q87 · Sentence Correction · SE
Airlines that still make the pilots pay to their training will find it difficult to fill vacancies.
A. make the pilots pay to their training
B. make the pilots pay for their training ✓
C. make the pilots pay with their training
D. make the pilots paying for their training
Answer: B. make the pilots pay for their training. Pay for is the correct preposition. You pay for a course or training.
Q88 · Sentence Correction · SE/DSE
The transit of the Planet of Love happen in pairs, eight years apart every century.
A. The transits of the Planet of Love happen in pairs
B. The transit of the Planet of Love happens in pairs ✓
C. No correction required
D. The transit happens in pairs of the Planet
Answer: B. The transit of the Planet of Love happens in pairs. Planet of Love = Venus (singular). Verb must be singular: happens.
Q89 · Sentence Correction · SE
Jane was asked by her aunt, "Where were you last night".
A. aunt that, "Where were you last night?"
B. No correction required
C. aunt, "Where had you been last night."
D. aunt, "Where were you last night?" ✓
Answer: D. aunt, "Where were you last night?". Direct question needs a question mark at the end.
Q90 · Sentence Correction · SE/DSE
The government appears to be at war with it's own people.
A. No correction required
B. to be at war against it's own people
C. to be at war with its own people ✓
D. to be on war with it's own people
Answer: C. to be at war with its own people. It's = it is (contraction). Need possessive its (no apostrophe).
Q91 · Sentence Correction · SE
This bridge neither crossed the Thames, and neither gave access to a lost island in the river.
A. This bridge either crossed the Thames, and nor gave
B. This bridge neither crossed the Thames, and nor gives
C. No correction required
D. This bridge either crossed the Thames, or gave ✓
Answer: D. This bridge either crossed the Thames, or gave. Neither...nor = none of two. Either...or = any one of two. Use either...or here.
Q92 · Sentence Correction · SE/DSE
It is a more difficult task to learn to type than mastering a simple word processing program.
A. than mastering
B. than to master ✓
C. than mastered
D. No correction required
Answer: B. than to master. Parallel structure: to learn to type must be paired with to master (both infinitives).
Q93 · Sentence Correction · SE
He is one of the best players who has ever played for this team.
A. who has
B. who have ✓
C. who is
D. No correction required
Answer: B. who have. One of the best players: relative clause refers to players (plural). Use who have.
Q94 · Sentence Correction · SE/DSE
Neither the manager nor the employees was satisfied with the decision.
A. was
B. were ✓
C. is
D. No correction required
Answer: B. were. With neither...nor, verb agrees with the noun closer to it. Employees (plural) = were.
Q95 · Sentence Correction · SE
She has been working in this company since five years.
A. has been working
B. has worked ✓
C. is working
D. No correction required
Answer: B. has worked. Since with period of time uses present perfect simple: has worked.
Q96 · Sentence Correction · SE
Between you and I, this deal is not in the company's best interest.
A. I
B. me ✓
C. myself
D. No correction required
Answer: B. me. After a preposition (between), use object pronouns: between you and me.
Q97 · Sentence Correction · SE
She is more smarter than her sister.
A. more smarter
B. smarter ✓
C. most smart
D. No correction required
Answer: B. smarter. Never use more with a comparative adjective ending in -er. Say smarter.
Q98 · Sentence Correction · SE/DSE
He doesn't knows the answer to this question.
A. doesn't know ✓
B. don't knows
C. does not knew
D. No correction required
Answer: A. doesn't know. After does/doesn't, the main verb takes its base form. Knows becomes know.
Q99 · Sentence Correction · SE
The manager, along with his team, are attending the conference.
A. is attending ✓
B. were attending
C. have been attending
D. No correction required
Answer: A. is attending. The manager is the subject. Along with his team is parenthetical. Use is (singular).
Q100 · Sentence Correction · DSE/SP
If I would have known about the meeting, I would have attended it.
A. would have known
B. had known ✓
C. would know
D. No correction required
Answer: B. had known. Third conditional: if-clause takes past perfect. If I had known... I would have attended.
Q101 · Sentence Correction · SE
Neither I nor my friends was informed about the change.
A. was
B. were ✓
C. is
D. No correction required
Answer: B. were. Neither...nor: verb agrees with the noun closer to it. Friends (plural) = were.
Q102 · Sentence Correction · SE/DSE
She insists to go to the party tonight.
A. insists to go
B. insists on going ✓
C. insists going
D. No correction required
Answer: B. insists on going. Insist is followed by preposition on and gerund: insist on going.
Q103 · Sentence Correction · SE/DSE
Each of the students have submitted their assignment.
A. has submitted ✓
B. have submitted
C. had been submitting
D. No correction required
Answer: A. has submitted. Each always takes a singular verb: has submitted.
Q104 · Sentence Correction · DSE
The phenomenon are being investigated by top scientists.
A. is being investigated ✓
B. are being investigated
C. were being investigated
D. No correction required
Answer: A. is being investigated. Phenomenon is singular; phenomena is plural. Use is being investigated.
Q105 · Sentence Correction · SE
I am looking forward to meet you at the conference.
A. to meet
B. to meeting ✓
C. to have met
D. No correction required
Answer: B. to meeting. Look forward to is followed by a gerund: looking forward to meeting you.
Q106 · Sentence Correction · SE/DSE
No sooner had she finished speaking than the audience burst into applause.
A. No correction required ✓
B. when
C. while
D. as soon as
Answer: A. No correction required. No sooner...than is the correct fixed expression. No error.
Q107 · Sentence Correction · SE
The teacher as well as students were present in the hall.
A. was present ✓
B. were present
C. have been present
D. No correction required
Answer: A. was present. The teacher (singular) is the subject. Use was present. As well as is parenthetical.
Q108 · Sentence Correction · SE
Unless you will not work harder, you will not pass the examination.
A. Unless you will not
B. Unless you work ✓
C. Unless you had
D. No correction required
Answer: B. Unless you work. Unless already contains a negative meaning. Adding not creates a double negative.
Q109 · Sentence Correction · SE/DSE
Five hundred rupees are not enough to buy a laptop.
A. is ✓
B. are
C. were
D. No correction required
Answer: A. is. Sums of money are treated as singular: Five hundred rupees is not enough.
Q110 · Sentence Correction · SE
She is good in singing and dancing.
A. good at ✓
B. good in
C. good for
D. No correction required
Answer: A. good at. The correct preposition is good at (not good in).
Section 5
🟡 Error Detection — Q111 to Q130

Error Detection

The sentence is divided into parts (A)(B)(C)(D). Identify the part with a grammatical error, or select No Error.

Q111 · Error Detection · SE
Hong Kong has been endowed (A) / with one of the finest natural (B) / harbour in the world. (C) / No error (D)
A. Hong Kong has been endowed
B. with one of the finest natural
C. harbour in the world ✓
D. No error
Answer: C. harbour in the world. One of must be followed by a plural noun. Correct: harbours.
Q112 · Error Detection · SE/DSE
Angered over the delay (A) / factory workers shouted (B) / slogans against the President (C) / when he reaches the office. (D)
A. Angered over the delay
B. factory workers shouted
C. slogans against the President
D. when he reaches the office ✓
Answer: D. when he reaches the office. The sentence is in past tense. Reaches should be reached.
Q113 · Error Detection · SE
The phenomena currently under investigation (A) / by the renowned scientist concerns (B) / the interactions of (C) / laser light with biological materials. (D)
A. The phenomena ✓
B. by the renowned scientist concerns
C. the interactions of
D. No error
Answer: A. The phenomena. Phenomena is plural; phenomenon is singular. Since concerns (singular) is used, subject should be phenomenon.
Q114 · Error Detection · SE/DSE
It is a more difficult (A) / task to learn to type than mastering (B) / a simple (C) / word processing program. (D)
A. It is a more difficult
B. task to learn to type than mastering ✓
C. a simple
D. No error
Answer: B. task to learn to type than mastering. Parallel structure: to learn to type than to master. Both must be infinitives.
Q115 · Error Detection · SE
No less than twenty persons (A) / were killed in (B) / the air crash. (C) / No error (D)
A. No less than twenty persons ✓
B. were killed in
C. the air crash
D. No error
Answer: A. No less than twenty persons. For countable items, no fewer than is preferred. Also persons is better as people here.
Q116 · Error Detection · SE
Volunteers of an NGO (A) / interacted with school students (B) / to spread awareness about (C) / environment related issues. (D)
A. Volunteers of an NGO
B. interacted with school students
C. to spread awareness about
D. environment related issues ✓
Answer: D. environment related issues. Compound adjectives before a noun need a hyphen: environment-related issues.
Q117 · Error Detection · SE/DSE
An independent enquiry headed by (A) / Anthony White QC in 2011 further examined (B) / the claims but also exonerated Coucher. (C) / No error (D)
A. An independent enquiry headed by
B. Anthony White QC in 2011 further examined
C. the claims but also exonerated Coucher ✓
D. No error
Answer: C. the claims but also exonerated Coucher. A comma is needed after claims before but.
Q118 · Error Detection · SE
She asked me (A) / that would I (B) / help her with (C) / the project. (D)
A. She asked me
B. that would I ✓
C. help her with
D. No error
Answer: B. that would I. In reported speech, that would I should be whether I would.
Q119 · Error Detection · DSE/SP
Despite of working hard (A) / he could not (B) / pass the examination (C) / in the first attempt. (D)
A. Despite of working hard ✓
B. he could not
C. pass the examination
D. No error
Answer: A. Despite of working hard. Despite is never followed by of. Correct: Despite working hard.
Q120 · Error Detection · SE
He has been (A) / living in Mumbai (B) / for the last twenty years, (C) / isn't he? (D)
A. He has been
B. living in Mumbai
C. for the last twenty years
D. isn't he? ✓
Answer: D. isn't he?. Has been living: question tag must match. Correct: hasn't he?
Q121 · Error Detection · SE
The number of students who (A) / are absent from class (B) / have increased (C) / this month. (D)
A. The number of students who
B. are absent from class
C. have increased ✓
D. No error
Answer: C. have increased. The number of takes a singular verb. Correct: has increased.
Q122 · Error Detection · SE
He was (A) / confident that he (B) / will succeed (C) / in the interview. (D)
A. He was
B. confident that he
C. will succeed ✓
D. No error
Answer: C. will succeed. Main clause is past (was), so reported clause should also be past: would succeed.
Q123 · Error Detection · SE/DSE
One should not boast (A) / of his achievements (B) / before others. (C) / No error. (D)
A. One should not boast
B. of his achievements ✓
C. before others
D. No error
Answer: B. of his achievements. One should be followed by one's not his. Correct: of one's achievements.
Q124 · Error Detection · SE
He was (A) / confident that (B) / all will go (C) / well. (D)
A. He was
B. confident that
C. all will go ✓
D. No error
Answer: C. all will go. Main clause past tense: should be all would go well.
Q125 · Error Detection · DSE
I often feel I am an outsider (A) / when it comes to my interests (B) / most of my friends (C) / are not fond with classical music. (D)
A. I often feel I am an outsider
B. when it comes to my interests
C. most of my friends
D. are not fond with classical music ✓
Answer: D. are not fond with classical music. The correct phrase is fond of not fond with.
Q126 · Error Detection · SE
The boy (A) / fell of (B) / the bicycle (C) / and hurt himself. (D)
A. The boy
B. fell of ✓
C. the bicycle
D. No error
Answer: B. fell of. The correct preposition is off not of. Correct: fell off the bicycle.
Q127 · Error Detection · SE
I want to (A) / lay down for (B) / a while before (C) / the meeting. (D)
A. I want to
B. lay down ✓
C. a while before
D. No error
Answer: B. lay down. Lay requires an object. Lie down (intransitive) is correct when the subject reclines.
Q128 · Error Detection · SE
Hardly had he entered the room (A) / than the lights (B) / went out. (C) / No error (D)
A. Hardly had he entered the room
B. than the lights ✓
C. went out
D. No error
Answer: B. than the lights. Hardly...when is the correct structure. Hardly...than is incorrect.
Q129 · Error Detection · DSE/SP
I had barely (A) / gone to sleep (B) / when the phone (C) / had rung. (D)
A. I had barely
B. gone to sleep
C. when the phone
D. had rung ✓
Answer: D. had rung. Barely...when: the second event should be in simple past. Correct: when the phone rang.
Q130 · Error Detection · SE
He said that (A) / he has been (B) / waiting for (C) / two hours. (D)
A. He said that
B. he has been ✓
C. waiting for
D. No error
Answer: B. he has been. Said that (past) should be followed by past perfect continuous: he had been waiting.
Section 6
🟢 Reading Comprehension — Q131 to Q165

Reading Comprehension

Read each passage carefully then answer the questions. Tip: Read questions first, then find answers in the passage.

Passage 1 — Gender & Communication (SE / DSE)
Although there is great variation within each gender, on average men and women discuss a surprisingly different range of topics. Studies show women and men from seventeen to eighty discussed different topics with same-sex friends. Common topics included work, movies and television. Female friends spent more time on personal and domestic subjects, relationships, family, health, weight, food and clothing. Men preferred music, current events, sports and business. Women gossiped about close friends and family; men about sports figures and media personalities. These differences can lead to frustration when men and women try to converse.
Passage 2 — Technology & Critical Thinking (SE / DSE / SP)
In the era of technology, where information is abundant, critical thinking becomes a paramount skill. The ability to analyze, evaluate, and synthesize information is crucial for making informed decisions. Technology has given us access to an unprecedented volume of data, but without the capacity to think critically, this abundance can be overwhelming and even misleading. Schools increasingly recognise that teaching students how to think — rather than what to think — is the core mission of modern education.
Passage 3 — Media & Public Trust (DSE / SP)
The decline of the news media's role as a public trust has affected its obligations to civil society. Journalists share a strong conviction that market pressures are undermining the quality of journalism; as news organisations preserve high profit levels by reducing news-gathering resources and neglecting journalism in the public interest, the fundamental role of the press to inform and empower citizens is endangered. A free and independent press is essential to human liberty.
Passage 4 — Library Scheme in India (SE)
The process of accessing books under the library scheme is quite long and cumbersome, and payments are made very late. As a result a large number of publishers do not choose to apply under the scheme. We should revise the scheme and make it attractive and meaningful. We should also arrange regular orientation courses for librarians and frame comprehensive library regulations in each state.
Q131 · Reading Comprehension · SE
[Passage 1 — Gender & Communication] According to the passage, which of the following is INCORRECT?
A. Work, movies and TV are common topics for both
B. Women like to gossip while men do not ✓
C. Men are more inclined towards sports and business
D. Men and women discuss a different range of topics
Answer: B. Women like to gossip while men do not. The passage says men DO gossip — about sports figures. Option B incorrectly claims men do not gossip at all.
Q132 · Reading Comprehension · SE
[Passage 1] After what age does the range of topics that each gender finds interesting start to differ?
A. 17 ✓
B. 22
C. 43
D. 50
Answer: A. 17. The passage states: women and men ranging in age from seventeen to eighty.
Q133 · Reading Comprehension · DSE
[Passage 1] What can be inferred from 'these differences can lead to frustration when men and women try to converse'?
A. Men and women should not converse
B. Communication gaps exist due to different interests ✓
C. Women are better communicators
D. Only work topics are safe in mixed conversations
Answer: B. Communication gaps exist due to different interests. Different topic preferences create communication gaps.
Q134 · Reading Comprehension · SE
[Passage 2 — Technology & Critical Thinking] What is the best summary of this passage?
A. Technology has made critical thinking obsolete
B. Critical thinking is essential in the age of technology ✓
C. Abundant information has diminished critical thinking
D. Technology has limited the need for critical thinking
Answer: B. Critical thinking is essential in the age of technology. The passage highlights the importance of critical thinking in the technology era.
Q135 · Reading Comprehension · DSE
[Passage 2] What does the author mean by 'teaching how to think rather than what to think'?
A. Schools should stop teaching facts
B. Developing reasoning skills matters more than memorising content ✓
C. Students should question every fact
D. Technology should replace teachers
Answer: B. Developing reasoning skills matters more than memorising content. How to think = reasoning skills. What to think = memorising information.
Q136 · Reading Comprehension · DSE
[Passage 3 — Media & Public Trust] What is the primary threat to quality journalism?
A. Lack of talented journalists
B. Market pressures that reduce news-gathering resources ✓
C. Government censorship
D. Readers not buying newspapers
Answer: B. Market pressures that reduce news-gathering resources. The passage explicitly states: market pressures are undermining journalism.
Q137 · Reading Comprehension · SP
[Passage 3] What does the author imply by 'a free and independent press is essential to human liberty'?
A. Press freedom guarantees economic prosperity
B. Only journalists should have freedom of expression
C. Democracy and civil liberty depend on an unbiased free press ✓
D. News media should be managed by the government
Answer: C. Democracy and civil liberty depend on an unbiased free press. Human liberty = civil rights and democratic freedoms.
Q138 · Reading Comprehension · SE
[Passage 4 — Library Scheme] What is the primary purpose of this passage?
A. Discuss the importance of books
B. Discuss the spread of library facilities
C. Discuss the reluctance of reading
D. Discuss the neglect of libraries by people and authorities ✓
Answer: D. Discuss the neglect of libraries by people and authorities. The passage discusses how the library scheme is dysfunctional.
Q139 · Reading Comprehension · DSE
[Passage 4] What can be inferred about publishers?
A. They avoid the scheme because of procedural inefficiency ✓
B. Libraries are maintained but people do not read
C. Publishers prefer digital over print
D. There are too many publishers in India
Answer: A. They avoid the scheme because of procedural inefficiency. Long process and late payments cause publishers to not apply.
Q140 · RC Inference · DSE/SP
A passage says: 'Despite repeated setbacks, the scientist never abandoned her research. Colleagues admired her tenacity.' What quality is highlighted?
A. Intelligence
B. Perseverance ✓
C. Ambition
D. Creativity
Answer: B. Perseverance. Tenacity = persistent determination despite difficulties = perseverance.
Q141 · RC Main Idea · SE
Which best describes the main idea of a passage discussing how urban farming reduces carbon footprints by cutting food transportation distances?
A. Urban farming contributes to environmental sustainability ✓
B. All cities should ban traditional farming
C. Transportation is the main cause of global warming
D. Farming should be restricted to rural areas only
Answer: A. Urban farming contributes to environmental sustainability. The central argument is that urban farming is a sustainable environmental practice.
Q142 · RC Tone · DSE
A passage strongly critiques government inaction on climate change using phrases like 'criminal negligence' and 'irreversible damage.' The tone is best described as:
A. Indignant ✓
B. Neutral
C. Celebratory
D. Sarcastic
Answer: A. Indignant. Indignant = feeling anger about perceived unfair treatment.
Q143 · RC Vocabulary · SE/DSE
In 'The legislation was seen as a panacea for the country's economic woes,' PANACEA most closely means:
A. Problem
B. Universal cure ✓
C. Partial solution
D. Controversial decision
Answer: B. Universal cure. Panacea = a solution or remedy for all difficulties or diseases.
Q144 · RC Inference · SE
Passage: 'The CEO gave bonuses to every employee and publicly praised the team. Morale soared.' What can you infer?
A. Recognition and reward improve employee motivation ✓
B. Employees only care about money
C. Public praise always causes morale problems
D. The company was facing a loss
Answer: A. Recognition and reward improve employee motivation. Bonuses and public praise led to soaring morale.
Q145 · RC Detail · SE
Passage: 'Only 30% of plastic waste is recycled globally. The rest ends up in landfills or oceans.' Where does most unrecycled plastic end up?
A. Landfills or oceans ✓
B. Recycling plants
C. Energy generation facilities
D. Compost sites
Answer: A. Landfills or oceans. Directly stated: the rest ends up in landfills or oceans.
Q146 · RC Purpose · DSE
A passage presents multiple perspectives on AI replacing jobs without favouring one side. The author's purpose is most likely to:
A. Present a balanced analysis of the AI-employment debate ✓
B. Argue that AI is harmful
C. Convince readers to support AI development
D. Entertain readers with AI stories
Answer: A. Present a balanced analysis of the AI-employment debate. Multiple perspectives without a conclusion = balanced analytical approach.
Q147 · RC Vocabulary · SE
'The critics were ACERBIC in their reviews of the film.' ACERBIC most nearly means:
A. Complimentary
B. Sharply critical ✓
C. Neutral
D. Enthusiastic
Answer: B. Sharply critical. Acerbic = sharp and forthright in a way that shows critical disapproval.
Q148 · RC Assumption · DSE/SP
Statement: 'Who rises from prayer a better man, his prayer is answered.' Assumption: Prayers make a man more human. Is this assumption implicit?
A. Yes, implicit
B. No, not implicit ✓
C. Cannot be determined
D. Partially implicit
Answer: B. No, not implicit. The statement focuses on personal improvement. Whether prayers make one more human is not implied.
Q149 · RC Inference · SE
Passage: 'Solar panels have become 89% cheaper since 2010.' What can be inferred?
A. Solar energy is becoming more accessible and affordable ✓
B. Solar panels are now free
C. All homes should install solar panels
D. Traditional energy is more popular now
Answer: A. Solar energy is becoming more accessible and affordable. An 89% cost reduction means solar energy is increasingly accessible.
Q150 · RC Detail · SE/DSE
Passage: 'The rise of remote work has blurred the boundary between professional and personal life, leading to burnout.' Which conclusion is best supported?
A. Remote work should be banned
B. Remote work without boundaries negatively affects well-being ✓
C. Office work is always better
D. Burnout only affects remote workers
Answer: B. Remote work without boundaries negatively affects well-being. The absence of work-life boundaries (not remote work itself) causes burnout.
Q151 · RC Inference · DSE
A passage concludes: 'Students who ask questions consistently outperform those who passively absorb information.' What does this imply?
A. Questions waste classroom time
B. Active engagement leads to better academic outcomes ✓
C. Teachers should ask all questions
D. Passive students should be punished
Answer: B. Active engagement leads to better academic outcomes. Students who ask questions = active engagement = better outcomes.
Q152 · RC Vocabulary · SE/DSE
'The politician's speech was deliberately OBFUSCATORY, leaving the audience confused.' OBFUSCATORY means:
A. Clear and direct
B. Intentionally confusing ✓
C. Emotionally moving
D. Factually incorrect
Answer: B. Intentionally confusing. Obfuscatory = designed to obscure understanding; deliberately confusing.
Q153 · RC Summary · SE
A passage discusses how rising inflation leads to decreased consumer spending which slows economic growth. The best one-sentence summary is:
A. Inflation always leads to economic growth
B. Consumer spending has no relation to inflation
C. Inflation reduces consumer spending and slows economic growth ✓
D. Government intervention can always stop inflation
Answer: C. Inflation reduces consumer spending and slows economic growth. Directly summarises the causal chain: inflation reduces spending, slowing growth.
Q154 · RC Detail · SE
Passage: 'The Amazon rainforest produces 20% of the world's oxygen and is home to 10% of all species on Earth.' Which statement is directly supported?
A. The Amazon should be converted to farmland
B. The Amazon is critical to global biodiversity and oxygen production ✓
C. 90% of species live outside the Amazon
D. Oxygen production is declining worldwide
Answer: B. The Amazon is critical to global biodiversity and oxygen production. Directly supported by both facts stated.
Q155 · RC Inference · DSE/SP
A passage describes how a company saw 20% productivity increase after implementing a four-day work week. Which inference is most justified?
A. All companies must adopt four-day work weeks immediately
B. Reduced hours can increase productivity if employees are well-rested ✓
C. Four-day weeks only work in large companies
D. Employees work harder when paid less
Answer: B. Reduced hours can increase productivity if employees are well-rested. Correlation between reduced hours and increased productivity: rest improves output.
Q156 · RC Tone · SE
A passage uses phrases like 'unfortunately', 'it is deeply troubling', and 'we must act now.' The tone is best described as:
A. Optimistic
B. Concerned and urgent ✓
C. Satirical
D. Indifferent
Answer: B. Concerned and urgent. Words like unfortunately and deeply troubling signal concern. Must act now signals urgency.
Q157 · RC Detail · SE/DSE
Passage: 'Mahatma Gandhi led the Salt March in 1930 to protest British salt laws.' What was the purpose?
A. To celebrate Indian culture
B. To protest British taxation on salt ✓
C. To demand military independence
D. To promote trade with Britain
Answer: B. To protest British taxation on salt. Directly stated: to protest British salt laws.
Q158 · RC Inference · DSE
A passage states: 'Countries that invest more in primary education have higher GDP per capita two decades later.' What inference is most reasonable?
A. GDP grows instantly after education investment
B. Education investment leads to long-term economic development ✓
C. Only primary education matters for economic growth
D. GDP is not related to education at all
Answer: B. Education investment leads to long-term economic development. Two decades later suggests a long-term effect of education investment.
Q159 · RC Summary · SE
A passage describes how social media connects people globally but also spreads misinformation rapidly. The best title would be:
A. The Benefits of Social Media
B. Social Media: A Double-Edged Sword ✓
C. Why Social Media Should Be Banned
D. How to Use Social Media Effectively
Answer: B. Social Media: A Double-Edged Sword. Double-edged sword captures both the benefit (connection) and drawback (misinformation).
Q160 · RC Detail · SE
Passage: 'India is the world's largest democracy with over 900 million eligible voters.' Which is directly supported?
A. India has the largest military in Asia
B. India has over 900 million eligible voters ✓
C. India's population is 900 million
D. India has the most political parties
Answer: B. India has over 900 million eligible voters. Directly stated in the passage.
Q161 · RC Vocabulary · DSE/SP
'The author's prose was LAPIDARY — precise, polished, and gem-like in its clarity.' LAPIDARY most nearly means:
A. Vague and informal
B. Extremely long-winded
C. Precise and elegantly concise ✓
D. Scientifically accurate
Answer: C. Precise and elegantly concise. Lapidary (from Latin lapis = stone) = concise and brilliantly crafted.
Q162 · RC Assumption · SP
Statement: 'The government should invest more in mental health infrastructure.' Which assumption is implicit?
A. Mental health is currently adequately funded
B. Mental health infrastructure is currently insufficient ✓
C. Physical health is less important than mental health
D. Only governments can solve mental health crises
Answer: B. Mental health infrastructure is currently insufficient. The recommendation to invest more implies current investment is insufficient.
Q163 · RC Detail · SE
Passage: 'Antibiotics should not be used to treat viral infections. Overuse contributes to antimicrobial resistance.' What is the author warning against?
A. Using too many vitamins
B. Misusing antibiotics for viral infections ✓
C. Ignoring bacterial infections
D. Reducing hospital budgets
Answer: B. Misusing antibiotics for viral infections. Directly supported: using antibiotics for viral infections is the specific misuse warned against.
Q164 · RC Inference · SE/DSE
A passage describes how students in Finland have shorter school days but consistently top global rankings. What can be inferred?
A. Longer school days are always better
B. Quality of instruction matters more than duration ✓
C. Finnish students study privately for more hours
D. Global education rankings are unreliable
Answer: B. Quality of instruction matters more than duration. Shorter days + top rankings = quality of instruction is the differentiating factor.
Q165 · RC Main Idea · DSE/SP
A passage argues that while technology has made life convenient, it has simultaneously increased social isolation, anxiety, and screen addiction. The main idea is:
A. Technology should be banned
B. Technology has brought convenience but also significant social costs ✓
C. Convenience is the most important goal of technology
D. Social media alone is responsible for all mental health issues
Answer: B. Technology has brought convenience but also significant social costs. Acknowledges both benefits (convenience) and costs (isolation, anxiety).
Section 7
🔵 Para Jumbles — Q166 to Q180

Para Jumbles

Arrange the given sentences into a logical, coherent paragraph. Find the opening sentence first.

Q166 · Para Jumble · SE
Arrange: (P) He decided to pursue art despite opposition. (Q) As a young man, he was passionate about painting. (R) Today his works are exhibited in galleries worldwide. (S) His family wanted him to become an engineer.
A. P-Q-S-R
B. Q-S-P-R ✓
C. S-Q-P-R
D. R-P-S-Q
Answer: B. Q-S-P-R. Q introduces character and passion. S introduces conflict. P shows decision. R is the outcome.
Q167 · Para Jumble · SE/DSE
(P) This leads to poor decision-making. (Q) When employees are not heard, morale drops. (R) Companies that ignore feedback stagnate. (S) Low morale results in high attrition.
A. R-Q-S-P ✓
B. Q-P-S-R
C. P-Q-R-S
D. S-R-Q-P
Answer: A. R-Q-S-P. R states the premise. Q gives first consequence. S gives second consequence. P gives the impact.
Q168 · Para Jumble · SE
(P) Readers must therefore approach news critically. (Q) Social media has made it easier to spread false information. (R) Not all content shared online is verified. (S) This has had a profound impact on public opinion.
A. P-Q-R-S
B. Q-S-R-P ✓
C. R-S-P-Q
D. S-Q-P-R
Answer: B. Q-S-R-P. Q introduces the topic. S shows its effect. R elaborates the problem. P offers the solution.
Q169 · Para Jumble · DSE/SP
(P) It is therefore crucial to invest in renewable energy. (Q) Fossil fuels are finite and cause significant environmental damage. (R) Climate change poses an existential threat. (S) Transitioning to renewables could mitigate these effects significantly.
A. R-Q-S-P ✓
B. Q-P-R-S
C. S-R-P-Q
D. P-S-Q-R
Answer: A. R-Q-S-P. R establishes the broad threat. Q explains the problem with current energy. S introduces the solution. P calls to action.
Q170 · Para Jumble · SE
(P) The results confirmed what many had suspected. (Q) A team of scientists conducted a two-year study. (R) They published their findings in a peer-reviewed journal. (S) It focused on the effects of screen time on children's sleep.
A. P-Q-R-S
B. Q-S-P-R ✓
C. R-P-Q-S
D. S-Q-P-R
Answer: B. Q-S-P-R. Q introduces scientists. S explains the focus. P states the results. R is the final outcome.
Q171 · Para Jumble · SE/DSE
(P) She ultimately won the gold medal. (Q) She trained for twelve hours a day. (R) The athlete had always dreamed of the Olympics. (S) Her dedication paid off at the World Championship.
A. R-Q-S-P ✓
B. Q-R-S-P
C. P-Q-S-R
D. S-R-Q-P
Answer: A. R-Q-S-P. R = dream. Q = effort. S = recognition. P = ultimate result.
Q172 · Para Jumble · SE
(P) This is a skill that takes years to develop. (Q) Effective leaders know how to motivate others. (R) They also know when to step back and delegate. (S) Leadership is more than just giving orders.
A. S-Q-R-P ✓
B. Q-S-P-R
C. R-Q-S-P
D. P-R-Q-S
Answer: A. S-Q-R-P. S defines leadership. Q and R describe skills. P concludes by noting it takes time.
Q173 · Para Jumble · DSE/SP
(P) Without access to clean water, communities face severe health risks. (Q) Water scarcity is one of the most pressing global challenges. (R) Governments must prioritise water conservation. (S) Millions lack access to safe drinking water.
A. Q-S-P-R ✓
B. S-P-Q-R
C. P-R-S-Q
D. R-P-Q-S
Answer: A. Q-S-P-R. Q introduces the challenge. S gives the scale. P explains the consequence. R proposes the solution.
Q174 · Para Jumble · SE
(P) However, with the right support they can overcome these obstacles. (Q) First-generation college students face unique challenges. (R) Many lack financial resources and mentorship. (S) Universities must create inclusive support programmes.
A. Q-R-P-S ✓
B. P-Q-R-S
C. R-Q-S-P
D. S-P-Q-R
Answer: A. Q-R-P-S. Q introduces the group. R explains challenges. P provides hope. S gives the institutional call to action.
Q175 · Para Jumble · SE/DSE
(P) Meditation has been linked to reduced anxiety and improved focus. (Q) More people are incorporating mindfulness into daily routines. (R) Scientific studies continue to support these benefits. (S) It appears the mind responds well to deliberate calm.
A. Q-P-R-S ✓
B. P-Q-S-R
C. R-S-Q-P
D. S-P-R-Q
Answer: A. Q-P-R-S. Q introduces the trend. P gives a specific benefit. R adds scientific backing. S draws a broad conclusion.
Q176 · Para Jumble · DSE
(P) The invention of the printing press transformed the spread of knowledge. (Q) Before it, books were rare and expensive. (R) Gutenberg's press democratised access to information. (S) This laid the groundwork for the Renaissance.
A. P-Q-R-S ✓
B. Q-P-S-R
C. R-Q-P-S
D. P-R-Q-S
Answer: A. P-Q-R-S. P introduces the invention. Q explains pre-press context. R gives the democratising effect. S shows historical consequences.
Q177 · Para Jumble · SE
(P) As a result, many industries are rethinking their business models. (Q) The shift to remote work was accelerated by the global pandemic. (R) Companies discovered productivity did not necessarily decline outside the office. (S) This finding challenged decades of traditional workplace assumptions.
A. Q-R-S-P ✓
B. R-Q-S-P
C. P-Q-R-S
D. S-R-Q-P
Answer: A. Q-R-S-P. Q establishes context. R presents the key discovery. S gives the significance. P shows the consequence.
Q178 · Para Jumble · SE/DSE
(P) Biodiversity loss threatens the stability of these ecosystems. (Q) Ecosystems depend on a delicate balance of species interactions. (R) Conservation efforts must target the root causes of habitat destruction. (S) Human activities like deforestation are the primary drivers.
A. Q-P-S-R ✓
B. P-Q-R-S
C. S-Q-P-R
D. R-S-P-Q
Answer: A. Q-P-S-R. Q introduces ecosystems and balance. P identifies the threat. S explains human causes. R proposes the solution.
Q179 · Para Jumble · DSE/SP
(P) Ethics in AI development is no longer philosophical but a practical necessity. (Q) Algorithmic biases can cause real harm to marginalised communities. (R) Developers must build fairness and transparency into AI systems from the outset. (S) Without these safeguards, trust in AI will erode.
A. P-Q-R-S ✓
B. Q-S-P-R
C. R-P-Q-S
D. S-Q-R-P
Answer: A. P-Q-R-S. P establishes the premise. Q gives a specific harm. R proposes the solution. S warns of consequence of inaction.
Q180 · Para Jumble · SE
Identify the sentence that would BEST open a paragraph about digital literacy: (P) Schools must integrate digital literacy. (Q) Understanding technology is as fundamental as reading. (R) Many adults struggle to identify fake news. (S) Digital literacy empowers citizens.
A. P
B. Q ✓
C. R
D. S
Answer: B. Q. Q makes the broad introductory claim. Opening sentences introduce the topic broadly.
Section 8
🟠 Idioms & One-Word Substitution — Q181 to Q200

Idioms, Phrases & One-Word Substitution

These appear especially in DSE and SP roles. Know both literal and figurative meanings.

Q181 · Idioms · SE/DSE
'The new employee was asked to hit the ground running.' This means:
A. Start working outdoors
B. Begin working immediately and energetically ✓
C. Run during work hours
D. Fall down while starting
Answer: B. Begin working immediately and energetically. Hit the ground running = to start something with immediate, energetic effort.
Q182 · Idioms · SE
'She burns the midnight oil before every exam.' This means:
A. She studies late into the night ✓
B. She lights candles while studying
C. She wakes up early to study
D. She sleeps before exams
Answer: A. She studies late into the night. Burn the midnight oil = to work or study late at night.
Q183 · Idioms · SE/DSE
'The project was a blessing in disguise.' This means:
A. The project was hidden from everyone
B. Something that seemed bad turned out to be good ✓
C. The project was dressed up attractively
D. An unexpected project arrived
Answer: B. Something that seemed bad turned out to be good. A blessing in disguise = an apparent misfortune that eventually has good results.
Q184 · Idioms · DSE/SP
'The manager told the team not to beat around the bush.' This means:
A. Avoid unnecessary talk and get to the point ✓
B. Do not go near the garden
C. Do not argue with each other
D. Work without complaining
Answer: A. Avoid unnecessary talk and get to the point. Beat around the bush = to avoid coming to the main point.
Q185 · Phrasal Verb · SE
'The meeting was called off.' CALLED OFF means:
A. Cancelled ✓
B. Postponed
C. Started
D. Extended
Answer: A. Cancelled. Call off = to cancel an event or activity that was planned.
Q186 · One-Word Sub · SE/DSE
A person who can speak two languages fluently:
A. Polyglot
B. Bilingual ✓
C. Multilingual
D. Interpreter
Answer: B. Bilingual. Bilingual = able to speak two languages fluently.
Q187 · One-Word Sub · SE
A government run by the people:
A. Democracy ✓
B. Monarchy
C. Oligarchy
D. Autocracy
Answer: A. Democracy. From Greek: demos (people) + kratos (rule). A system of government by the whole population.
Q188 · One-Word Sub · DSE/SP
The study of the origin and history of words:
A. Phonology
B. Etymology ✓
C. Morphology
D. Lexicology
Answer: B. Etymology. Etymology = the study of the origin and historical development of words.
Q189 · One-Word Sub · SE
A person who eats too much:
A. Glutton ✓
B. Gourmet
C. Herbivore
D. Vegan
Answer: A. Glutton. A glutton is a person who eats excessively.
Q190 · One-Word Sub · SE/DSE
A place where animals are kept for public viewing:
A. Zoo ✓
B. Aquarium
C. Sanctuary
D. Aviary
Answer: A. Zoo. A zoo (zoological garden) is a place where animals are kept for public display.
Q191 · Idioms · SE
'He let the cat out of the bag.' This idiom means:
A. He set a cat free
B. He accidentally revealed a secret ✓
C. He told an animal story
D. He caused confusion
Answer: B. He accidentally revealed a secret. Let the cat out of the bag = to accidentally reveal secret information.
Q192 · One-Word Sub · DSE
Killing of a large group of people, especially those of a particular ethnic group:
A. Homicide
B. Genocide ✓
C. Suicide
D. Fratricide
Answer: B. Genocide. Genocide = deliberate killing of a large group, especially of a particular ethnic group.
Q193 · Phrasal Verb · SE/DSE
'The company decided to call off the strike.' CALL OFF means:
A. Cancel ✓
B. Support
C. Announce
D. Continue
Answer: A. Cancel. To call off = to cancel something that was planned or in progress.
Q194 · Idioms · DSE/SP
'The CEO was walking on thin ice by challenging the board's decision.' This means:
A. He was in a risky or dangerous situation ✓
B. He was walking carefully on ice
C. He was making a bold but safe move
D. He was being extremely cautious
Answer: A. He was in a risky or dangerous situation. Walk on thin ice = to be in a risky situation where danger is just below the surface.
Q195 · One-Word Sub · SE
A person who is against war or use of violence:
A. Pacifist ✓
B. Anarchist
C. Fascist
D. Activist
Answer: A. Pacifist. A pacifist believes war and violence are unjustifiable.
Q196 · Idioms · SE
'She bit the bullet and accepted the pay cut.' This means:
A. She fought against the decision
B. She endured a painful situation bravely ✓
C. She ate something and got sick
D. She quit her job
Answer: B. She endured a painful situation bravely. Bite the bullet = to endure a painful or difficult situation that is inevitable.
Q197 · One-Word Sub · DSE/SP
A person who knows a great deal about many subjects:
A. Polymath ✓
B. Polyglot
C. Pundit
D. Scholar
Answer: A. Polymath. Polymath = a person of wide knowledge across many subjects.
Q198 · Idioms · SE/DSE
'After years of hard work, success finally came. She had turned the corner.' This means:
A. She changed her direction of travel
B. She passed the worst part of a difficult situation ✓
C. She turned her back on success
D. She started a new problem
Answer: B. She passed the worst part of a difficult situation. Turn the corner = to pass the most difficult stage and start to improve.
Q199 · One-Word Sub · SE
The practice of having more than one wife at the same time:
A. Polygamy ✓
B. Bigamy
C. Monogamy
D. Celibacy
Answer: A. Polygamy. Polygamy = the practice of having more than one spouse simultaneously.
Q200 · Idioms · DSE/SP
'The startup's growth was a double-edged sword.' This means:
A. The growth had both advantages and disadvantages ✓
B. The company used two different strategies
C. The startup was growing twice as fast
D. The sword was the company's logo
Answer: A. The growth had both advantages and disadvantages. Double-edged sword = something that has both positive and negative consequences.
FAQ

Frequently Asked Questions

How many verbal ability questions come in Infosys exam?
The Infosys verbal ability section has 20–25 questions in 20–35 minutes. For SE it is 20 questions in 20 minutes. DSE and SP have higher difficulty and may have more questions.
Is there negative marking in Infosys verbal section?
Infosys typically does not impose negative marking. Confirm in your specific exam notification. Attempt every question.
What is the difficulty level for SE vs DSE vs SP?
SE: Easy to Moderate — grammar, basic vocabulary, simple RC. DSE: Moderate to Hard — longer passages, inference questions. SP: Hard — critical reasoning and complex idioms.
How do I improve my Infosys verbal score quickly?
(1) Learn 100 key synonyms/antonyms. (2) Revise grammar rules — subject-verb agreement, tenses, prepositions. (3) For RC, read questions first then the passage. (4) Practice 20 timed questions daily.
Do idioms and one-word substitutions come in all roles?
Idioms are more common in DSE and SP roles. For SE, expect mostly grammar, fill in the blanks, RC and vocabulary. One-word substitution appears across all roles.
Courses

Want Complete Placement Preparation?

Explore all CampusMonk courses — mock tests, recorded programs, and full placement packs.

📚 Browse All Courses →

Top 100 Questions Asked in Cognizant Online Assessment

Top 100 Questions Asked in Cognizant Online Assessment

Everything you need to crack the Cognizant GenC, GenC Pro & GenC Next Online Assessment — with full answers and explanations.

📋 100 Real Questions 🎯 7 Sections Covered All Answers Included 🕐 2025–2026 Pattern

Cognizant OA Exam Pattern (2025–2026)

Cognizant runs three entry-level hiring tracks — GenC (4 LPA), GenC Pro (5.4 LPA), and GenC Next (6.75 LPA). Each has a slightly different assessment focus, but the core Online Assessment has the same structure. Here's the full breakdown so you're not surprised on exam day.

60

Communication Round

Reading, Grammar, Repeat-sentences via mic. Elimination round. Duration: 60 minutes.

80

Aptitude Round

40 Quants + 40 Logical Reasoning questions. No negative marking. Duration: 80 minutes.

3

Technical Round

3 coding or technical tasks based on your chosen skill cluster (Java/SQL/Python). Duration: 105–120 mins.

1:1

Interview Round

Technical + HR in one interview. GenC Next interviews last ~1 hour and go deep on DSA + DBMS.

💡 No negative marking — attempt every question. The platform is the Safe Assessment Browser (SAB). Tab switching is tracked. Practice on similar timed platforms before your actual exam.
📐

Section 1: Quantitative Aptitude

Q1 – Q20
1
There are 40 students in a class — 14 taking Maths and 29 taking Computer. What is the probability that a randomly chosen student is taking only the Computer class?
A) 40%
B) 55%
C) 65%
D) 70%
✅ Answer: C) 65%
Students taking both = 14 + 29 − 40 = 3. Only Computer = 29 − 3 = 26. Probability = 26/40 = 65%.
2
Three cubes of edges 6 cm, 8 cm and 10 cm are melted without loss of metal into a single cube. What is the edge of the new cube?
A) 10 cm
B) 12 cm
C) 14 cm
D) 16 cm
✅ Answer: B) 12 cm
Volume = 6³ + 8³ + 10³ = 216 + 512 + 1000 = 1728. Edge = ∛1728 = 12 cm.
3
If all 6s get inverted and become 9s between 1 and 100 (inclusive), by how much will the sum of all numbers change?
A) 300
B) 330
C) 333
D) None of these
✅ Answer: B) 330
6 at unit place (6, 16, 26… 96) → 10 numbers → increase by 3 each = +30. 6 at tens place (60–69) → 10 numbers → increase by 30 each = +300. Total = 330.
4
Rajesh spent money on 5 pens, 3 notebooks & 9 pencils. Prabhu bought 6 pens, 6 notebooks & 18 pencils and paid 50% more than Rajesh. What % of Rajesh's money was spent on pens?
A) 62.5%
B) 12.5%
C) 75%
D) Cannot be determined
✅ Answer: A) 62.5%
Let Rajesh spend x. Solving the equations: 1 pen = 0.125x. So 5 pens = 0.625x = 62.5%.
5
A person walks at 10 km/h to reach a destination. He walks back the same route at 14 km/h arriving 20 km less. What was the actual distance?
A) 50 km
B) 40 km
C) 60 km
D) 45 km
✅ Answer: A) 50 km
Let x = distance. x/10 = (x+20)/14 → 14x = 10x + 200 → 4x = 200 → x = 50 km.
6
A bus covers 54 km/h without stoppages and 45 km/h with stoppages. For how many minutes per hour does the bus stop?
A) 10
B) 12
C) 20
D) 9
✅ Answer: A) 10 minutes
Distance lost per hour = 54 − 45 = 9 km. Time to cover 9 km at 54 km/h = (9/54) × 60 = 10 minutes.
7
The distance between cities P and Q is 300 km. Train from P starts at 10 AM at 80 km/h; train from Q starts at 11 AM at 40 km/h. At what time do they meet?
A) 12:50 PM
B) 1:00 PM
C) 12:20 PM
D) 12:40 PM
✅ Answer: A) 12:50 PM
By 11 AM, Train P covers 80 km. Remaining = 220 km. Closing speed = 120 km/h. Time = 220/120 = 1 hr 50 min. 11:00 + 1:50 = 12:50 PM.
8
A shopkeeper bought 30 kg rice at ₹40/kg. Sold 40% at ₹50/kg. At what price per kg should he sell the rest to make a 25% overall profit?
A) ₹50
B) ₹40
C) ₹30
D) ₹54
✅ Answer: A) ₹50
Total CP = 30×40 = ₹1200. Required SP = 1200 × 1.25 = ₹1500. SP of first 12 kg = ₹600. Remaining SP needed = ₹900 for 18 kg = ₹50/kg.
9
The greatest number that divides 964, 1238, and 1400 leaving remainders 41, 31, and 51 respectively is?
A) 71
B) 58
C) 64
D) 79
✅ Answer: A) 71
Subtract remainders: 964−41=923, 1238−31=1207, 1400−51=1349. HCF of 923, 1207, 1349 = 71.
10
Average temperature Mon–Wed was 37°C and Tue–Thu was 34°C. Thursday's temp was 4/5 of Monday's. What was Thursday's temperature?
A) 36°C
B) 36.5°C
C) 34°C
D) 35.5°C
✅ Answer: A) 36°C
Mon+Tue+Wed = 111, Tue+Wed+Thu = 102. So Mon−Thu = 9. With Thu = (4/5)Mon → solving: Mon = 45, Thu = 36°C.
11
Prakash sold a machine to Swapna at 30% profit. Swapna sold to Ajay at 20% loss. Prakash's cost was ₹5000. Find Ajay's cost price.
A) ₹4800
B) ₹5000
C) ₹5200
D) ₹4000
✅ Answer: C) ₹5200
Swapna's CP = 5000 × 1.30 = ₹6500. Ajay's CP = 6500 × 0.80 = ₹5200.
12
Average price of 10 books is ₹12. Average price of 8 of those books is ₹11.75. Of the remaining 2 books, one is 60% more than the other. Find the price of each.
A) ₹12 & ₹24
B) ₹24 & ₹18
C) ₹28 & ₹12
D) ₹10 & ₹16
✅ Answer: D) ₹10 & ₹16
Sum of 2 books = 120 − 94 = ₹26. Let cheaper = x, pricier = 1.6x. x + 1.6x = 26 → x = ₹10, other = ₹16.
13
Two trucks face each other 500 cm apart. Each moves forward 100 cm at 50 cm/s, then backward 50 cm at 25 cm/s. How long until they collide?
A) 12 sec
B) 16 sec
C) 13 sec
D) 14 sec
✅ Answer: D) 14 seconds
Each cycle (2s forward + 2s back) each truck nets +50 cm. At 14 sec, each truck has moved 250 cm → total 500 cm → collision.
14
A secret can be told by 2 persons in 5 minutes. Each tells it to 2 more, and so on. How long will it take to reach 768 persons?
A) 500 min
B) 50 min
C) 47.5 min
D) 49 min
✅ Answer: C) 47.5 minutes
Series: 1, 2, 4, 8, …, 512. Up to 512 people = 45 min. Then 256 people tell 256 more → +2.5 min. Total = 47.5 min.
15
378 coins consist of ₹1, 50p and 25p coins whose values are in ratio 13:11:7. How many 50p coins are there?
A) 132
B) 154
C) 176
D) 132
✅ Answer: B) 154
Value ratio 13:11:7 → coin count ratio = 13:22:28 (divide by denomination). Total = 63 parts = 378 → 1 part = 6. 50p coins = 22×6 = 132. (Verify with your actual exam version as ratios vary.)
16
In a group, 6 speak Tamil, 15 speak Hindi, 6 speak Gujarati. 2 speak two languages, 1 speaks all three. How many people are in the group?
A) 21
B) 22
C) 24
D) 23
✅ Answer: D) 23
Only Tamil = 3, Only Hindi = 12, Only Gujarati = 5. Total = 20 + 2 (bilingual) + 1 (trilingual) = 23.
17
A and B can complete a work in 12 days together. B and C in 15 days, A and C in 20 days. How many days will A alone take?
A) 30 days
B) 20 days
C) 24 days
D) 40 days
✅ Answer: A) 30 days
2(A+B+C) = 1/12+1/15+1/20 = 1/5. So A+B+C = 1/10. A alone = 1/10 − 1/15 = 1/30 → 30 days.
18
A train 150 m long passes a telegraph pole in 15 seconds. How long will it take to pass a platform 300 m long?
A) 30 sec
B) 45 sec
C) 40 sec
D) 60 sec
✅ Answer: B) 45 seconds
Speed = 150/15 = 10 m/s. Distance to cross platform = 150+300 = 450 m. Time = 450/10 = 45 seconds.
19
Simple interest on a sum at 5% per annum for 3 years is ₹1200. What is the compound interest on the same sum at the same rate for 2 years?
A) ₹800
B) ₹820
C) ₹840
D) ₹860
✅ Answer: B) ₹820
SI = PRT/100 → 1200 = P×5×3/100 → P = ₹8000. CI for 2 years = 8000×[(1.05)²−1] = 8000×0.1025 = ₹820.
20
In how many ways can 5 men and 3 women be arranged in a row so that no two women sit together?
A) 1440
B) 14400
C) 720
D) 2880
✅ Answer: B) 14400
Arrange 5 men: 5! = 120. Women can sit in 6 gaps (between/outside men): ⁶P₃ = 120. Total = 120 × 120 = 14400.
🧠

Section 2: Logical Reasoning

Q21 – Q40
21
There are 6 cities, every city connected to each other. How many different routes from A to B such that no city is touched more than once?
A) 72
B) 65
C) 60
D) 48
✅ Answer: B) 65
Direct = 1. Via 1 city = 4. Via 2 = 4×3=12. Via 3 = 24. Via 4 = 24. Total = 1+4+12+24+24 = 65.
22
Find the next number in the series: 2, 6, 12, 20, 30, ?
A) 38
B) 40
C) 42
D) 44
✅ Answer: C) 42
Pattern: n(n+1) → 1×2, 2×3, 3×4, 4×5, 5×6, 6×7 = 42.
23
If MANGO is coded as NBOHP, how is APPLE coded?
A) BQQMF
B) BQQLE
C) CRRNG
D) ARPLE
✅ Answer: A) BQQMF
Each letter is shifted +1 (A→B, P→Q, P→Q, L→M, E→F) = BQQMF.
24
Pointing to a man, a woman says "His mother is the only daughter of my mother." How is the woman related to the man?
A) Grandmother
B) Mother
C) Sister
D) Aunt
✅ Answer: B) Mother
"Only daughter of my mother" = the woman herself. So the man's mother is the woman herself → she is his Mother.
25
A is to the east of B. C is to the north of B. In which direction is A with respect to C?
A) North-East
B) South-East
C) South-West
D) North-West
✅ Answer: B) South-East
C is north of B, A is east of B. So A is to the South-East of C.
26
In a row of 40 students, Ravi is 15th from the left. What is his position from the right?
A) 24
B) 26
C) 27
D) 25
✅ Answer: B) 26
Position from right = 40 − 15 + 1 = 26.
27
Find the odd one out: 8, 27, 64, 100, 125, 216
A) 27
B) 100
C) 125
D) 216
✅ Answer: B) 100
All others are perfect cubes: 2³=8, 3³=27, 4³=64, 5³=125, 6³=216. But 100 = 10², not a perfect cube.
28
All project managers handle ≥3 projects. Some project managers are department heads. Which conclusion is valid?
A) Some department heads handle at least 3 projects
B) All department heads are project managers
C) Department heads handle fewer projects
D) None of the above
✅ Answer: A
Since some PMs are department heads and all PMs handle ≥3 projects, those department heads also handle ≥3 projects.
29
Find the missing term: 1, 4, 9, 16, 25, __, 49
A) 34
B) 38
C) 36
D) 40
✅ Answer: C) 36
Series of perfect squares: 1², 2², 3², 4², 5², 6²=36, 7².
30
5 people A, B, C, D, E sit in a row. A is at the right end. B is between C and D. E is at the left end. C is between E and B. Who is in the middle?
A) C
B) B
C) D
D) E
✅ Answer: B) B
Arrangement: E–C–B–D–A. Person in the middle (3rd position) is B.
31
If 6 × 4 = 46, 8 × 5 = 58, then 9 × 7 = ?
A) 63
B) 97
C) 79
D) 96
✅ Answer: C) 79
Pattern: second number, then first number reversed → 6×4=46 (4,6) → 8×5=58 (5,8) → 9×7=79.
32
In a clock, how many times do the hands coincide between 12 noon and 12 midnight?
A) 12
B) 11
C) 10
D) 22
✅ Answer: B) 11
In 12 hours, clock hands overlap 11 times (they don't overlap at exactly 12 AM and 12 PM separately — just once).
33
A man walks 3 km north, turns right and walks 4 km east, turns right and walks 3 km south. How far is he from the start?
A) 4 km
B) 7 km
C) 5 km
D) 3 km
✅ Answer: A) 4 km
North 3 km → East 4 km → South 3 km. North and South cancel. He is exactly 4 km East from the start.
34
If the day before yesterday was Saturday, what day will it be the day after tomorrow?
A) Tuesday
B) Wednesday
C) Thursday
D) Friday
✅ Answer: B) Wednesday
Day before yesterday = Saturday → Today = Monday. Day after tomorrow = Wednesday.
35
Find the next term: ACE, BDF, CEG, ?
A) DFG
B) DFH
C) EGH
D) CFH
✅ Answer: B) DFH
Each letter increases by 1 each step. Pattern: C→D, E→F, G→H = DFH.
36
In a certain code, GIVE is written as 5137 and BAT is written as 924. How is GATE written?
A) 5247
B) 5924
C) 5942
D) 9247
✅ Answer: A) 5247
G=5, I=1, V=3, E=7. B=9, A=2, T=4. So GATE = G(5), A(2), T(4), E(7) = 5247.
37
Which number does not belong in the group: 16, 25, 36, 72, 144, 196?
A) 36
B) 72
C) 144
D) 196
✅ Answer: B) 72
All others are perfect squares (4², 5², 6², 12², 14²). 72 is not a perfect square.
38
A is B's sister. C is B's mother. D is C's father. E is D's mother. How is A related to D?
A) Daughter
B) Grand Daughter
C) Great-granddaughter
D) Mother
✅ Answer: B) Grand Daughter
A is B's sister → A and B are children of C. C is D's daughter. So A is D's Grand Daughter.
39
Deductive reasoning game (Geo-Sudo type): In a 3×3 grid, each row and column must contain 1–3 without repetition. If row 1 is [1, _, 3] and column 2 has 3 in row 2, what is row 1 missing number?
A) 2
B) 1
C) 3
D) Cannot determine
✅ Answer: A) 2
Row 1 has 1 and 3. The missing number must be 2 (each number 1–3 appears once per row).
40
What is the angle between the hour and minute hands at 3:15?
A) 0°
B) 7.5°
C) 15°
D) 22.5°
✅ Answer: B) 7.5°
At 3:15, minute hand = 90°. Hour hand = 90 + (15×0.5) = 97.5°. Difference = 7.5°.
📖

Section 3: Verbal Ability

Q41 – Q55
41
Choose the correct sentence: A) She don't know the answer. B) She doesn't knows the answer. C) She doesn't know the answer. D) She not know the answer.
A) Sentence A
B) Sentence B
C) Sentence C
D) Sentence D
✅ Answer: C
"She doesn't know the answer" uses correct subject-verb agreement with third-person singular.
42
Fill in the blank: The committee ______ yet to reach a decision. (has / have)
A) has
B) have
C) are
D) were
✅ Answer: A) has
"Committee" is a collective noun treated as singular in formal English → has.
43
Choose the antonym of BENEVOLENT:
A) Generous
B) Kind
C) Malevolent
D) Gentle
✅ Answer: C) Malevolent
Benevolent = wishing good. Malevolent = wishing harm. Exact opposite.
44
Choose the synonym of VERBOSE:
A) Concise
B) Wordy
C) Silent
D) Clear
✅ Answer: B) Wordy
Verbose means using more words than needed. Wordy is the closest synonym.
45
Spot the error: "The team are playing good in the tournament."
A) team are
B) No error
C) playing good
D) in the
✅ Answer: C) playing good
Should be "playing well" — "well" is the adverb modifying the verb "playing", not the adjective "good".
46
Choose the word closest in meaning to EPHEMERAL:
A) Eternal
B) Transient
C) Permanent
D) Stable
✅ Answer: B) Transient
Ephemeral = lasting for a very short time. Transient has the same meaning.
47
Fill in: Neither the manager nor the employees ______ present for the meeting.
A) was
B) were
C) is
D) has been
✅ Answer: B) were
With "neither…nor", the verb agrees with the subject closer to it (employees = plural) → were.
48
One word substitution: A person who cannot be corrected.
A) Inexplicable
B) Invincible
C) Incorrigible
D) Inexorable
✅ Answer: C) Incorrigible
Incorrigible means a person who cannot be reformed or corrected.
49
Rearrange: TRAMS / SMART / RAMPS — which is NOT an anagram of the others?
A) TRAMS
B) SMART
C) RAMPS
D) All are anagrams
✅ Answer: C) RAMPS
TRAMS and SMART both use T,R,A,M,S. RAMPS uses R,A,M,P,S — different letter (P instead of T) → not an anagram.
50
Choose the correct passive voice: "The manager approved the project."
A) The project was approved by the manager.
B) The project is approved by the manager.
C) The project had been approved the manager.
D) The project approved by the manager.
✅ Answer: A
Simple past active → past passive = "was + past participle by subject" → The project was approved by the manager.
51
Reading comprehension (common type): If the passage says "Technology is a double-edged sword," the author most likely means:
A) Technology is dangerous
B) Technology is beneficial
C) Technology has both benefits and drawbacks
D) Technology is neutral
✅ Answer: C
"Double-edged sword" is an idiom meaning something has both positive and negative effects simultaneously.
52
Which sentence uses the correct tense? "By the time she arrives, we ______ the project."
A) finish
B) finished
C) will have finished
D) were finishing
✅ Answer: C) will have finished
"By the time" with a future reference requires the future perfect tense.
53
Choose the correctly spelled word:
A) Accomodate
B) Acommodate
C) Accommodate
D) Accomadate
✅ Answer: C) Accommodate
Accommodate has double 'c' and double 'm' — a commonly misspelled word in Cognizant verbal tests.
54
Sentence completion: The new software was ______ by the team after weeks of testing. (A) inaugurated (B) demolished (C) deployed (D) confiscated
A) Inaugurated
B) Demolished
C) Deployed
D) Confiscated
✅ Answer: C) Deployed
In a tech context, software is deployed — released for use. This is common Cognizant verbal context.
55
Identify the type of error: "He is one of those employees who works late every night."
A) No error
B) Tense error
C) Subject-verb agreement error
D) Article error
✅ Answer: C
"One of those employees who" requires plural verb → should be "work late every night" because the relative clause refers to "employees" (plural).
💻

Section 4: Technical / CS Fundamentals

Q56 – Q75
56
What is the time complexity of Binary Search?
A) O(n)
B) O(log n)
C) O(n²)
D) O(1)
✅ Answer: B) O(log n)
Binary search halves the search space each iteration → O(log n) time complexity.
57
Which OOP concept is illustrated when a child class inherits methods from a parent class?
A) Encapsulation
B) Polymorphism
C) Inheritance
D) Abstraction
✅ Answer: C) Inheritance
Inheritance allows a class to reuse attributes and methods from another class, forming a parent-child relationship.
58
What does SDLC stand for, and what is its purpose?
A) Software Design Life Cycle — to design software
B) Software Development Life Cycle — systematic process for building software
C) System Deployment Life Cycle — deploying systems
D) Software Debug Life Cycle — fixing bugs
✅ Answer: B
SDLC (Software Development Life Cycle) is the structured process of planning, building, testing, and maintaining software. Phases: Requirement → Design → Implement → Test → Deploy → Maintain.
59
Why is Java considered more secure than C/C++?
A) Java uses pointers
B) Java has no explicit pointer manipulation and runs in JVM sandbox
C) Java is slower
D) Java doesn't use memory
✅ Answer: B
Java eliminates direct memory access via pointers. Programs run in the JVM sandbox, preventing direct OS-level attacks and buffer overflow exploits common in C/C++.
60
What is the output of: print(type([])) in Python?
A) <class 'tuple'>
B) <class 'list'>
C) <class 'dict'>
D) <class 'set'>
✅ Answer: B) <class 'list'>
[] is an empty list literal in Python. type([]) returns <class 'list'>.
61
Which data structure uses LIFO (Last In, First Out) principle?
A) Queue
B) Stack
C) Linked List
D) Tree
✅ Answer: B) Stack
A Stack follows LIFO — the last element added is the first one removed. Like a stack of plates.
62
What is polymorphism in OOP?
A) Hiding data from outside world
B) Inheriting from multiple classes
C) One interface, multiple implementations
D) Storing different data types
✅ Answer: C
Polymorphism means "many forms." The same method name can behave differently depending on the object. Example: method overloading and overriding.
63
What is the difference between a process and a thread?
A) No difference
B) A process has its own memory; threads share process memory
C) A thread is heavier than a process
D) Threads run on different CPUs only
✅ Answer: B
A process = independent program with its own memory. A thread = lightweight unit within a process that shares the same memory space.
64
What does the 'final' keyword mean in Java?
A) The class runs faster
B) Variable/method/class cannot be modified or overridden
C) Method is static
D) It initializes automatically
✅ Answer: B
In Java, final variable = constant, final method = can't be overridden, final class = can't be inherited.
65
What is a primary key in a database?
A) Any column in a table
B) A column (or set of columns) that uniquely identifies each row
C) A foreign key reference
D) An indexed column only
✅ Answer: B
A primary key uniquely identifies each record in a table. It cannot be NULL and must be unique for every row.
66
What is the worst-case time complexity of QuickSort?
A) O(n log n)
B) O(n²)
C) O(n)
D) O(log n)
✅ Answer: B) O(n²)
QuickSort's worst case is O(n²) when the pivot is always the smallest or largest element (e.g., sorted array with bad pivot choice). Average = O(n log n).
67
What is the output of this Java snippet? int x = 5; System.out.println(x++); System.out.println(x);
A) 6 and 6
B) 5 and 6
C) 5 and 5
D) 6 and 5
✅ Answer: B) 5 and 6
x++ is post-increment → prints current value (5) first, then increments. Next print shows 6.
68
Which HTTP method is used to update data on a server (partial update)?
A) GET
B) POST
C) PUT
D) PATCH
✅ Answer: D) PATCH
PATCH is for partial updates. PUT replaces the entire resource. POST creates new. GET retrieves.
69
In an array of size n, what is the time complexity of accessing element at index i?
A) O(1)
B) O(n)
C) O(log n)
D) O(n²)
✅ Answer: A) O(1)
Array elements are stored at contiguous memory locations. Access by index is direct → O(1) constant time.
70
What is encapsulation in OOP?
A) Bundling data and methods together, hiding internal details
B) Creating multiple child classes
C) Writing the same method with different parameters
D) Running code in parallel
✅ Answer: A
Encapsulation wraps data (variables) and methods inside a class and controls access using access modifiers (private, public, protected).
71
What is a deadlock in operating systems?
A) A process running too fast
B) Two or more processes waiting for each other's resources indefinitely
C) An infinite loop in code
D) Memory overflow
✅ Answer: B
A deadlock occurs when processes are stuck in a circular wait — each holds a resource the other needs, so none can proceed.
72
What is the purpose of the 'static' keyword in Java?
A) It makes a variable final
B) It belongs to the class, not to an instance
C) It prevents inheritance
D) It automatically initializes variables
✅ Answer: B
static means the variable or method belongs to the class itself, not to any particular object. All instances share the same static member.
73
What does HTML stand for?
A) Hyper Text Making Language
B) HyperText Markup Language
C) High Transfer Markup Language
D) Hyper Transfer Markup Language
✅ Answer: B) HyperText Markup Language
HTML is the standard language for creating web pages. It uses tags to structure content for display in browsers.
74
What is normalization in database design?
A) Organizing tables to reduce data redundancy and improve integrity
B) Speeding up queries with indexes
C) Encrypting the database
D) Backing up the database
✅ Answer: A
Normalization is the process of organizing database tables to minimize redundancy. Forms: 1NF, 2NF, 3NF, BCNF.
75
What is the difference between == and .equals() in Java?
A) == compares references; .equals() compares actual content/values
B) They are exactly the same
C) == compares values; .equals() compares memory
D) .equals() only works for integers
✅ Answer: A
== checks if two variables point to the same object in memory. .equals() checks if the content of two objects is the same.
⌨️

Section 5: Coding Problems (GenC Next)

Q76 – Q85
76
Write a function to check if a string is a palindrome. What is the most efficient approach?
A) Use nested loops O(n²)
B) Use two-pointer technique O(n)
C) Reverse and compare using recursion O(n log n)
D) Sort and compare O(n log n)
✅ Answer: B) Two-pointer O(n)
Compare characters from both ends moving inward. If any mismatch → not a palindrome.
def is_palindrome(s): left, right = 0, len(s) - 1 while left < right: if s[left] != s[right]: return False left += 1 right -= 1 return True
77
There are N suns in a galaxy, each with M planets, each with some moons [galaxy[i][j]]. Find the maximum number of moons in any single solar system.
A) Sum each row, return maximum row sum
B) Find the maximum single cell value
C) Sum all values in the entire grid
D) Count number of columns
✅ Answer: A — Sum rows, find maximum
Each solar system (row) = one sun. Sum all moons per sun, return the highest total.
def max_moons(galaxy): max_sum = 0 for solar_system in galaxy: max_sum = max(max_sum, sum(solar_system)) return max_sum
78
Find the second largest element in an unsorted array without sorting it. What is the time complexity?
A) O(n log n) — sort then pick
B) O(n) — single pass tracking two variables
C) O(n²) — nested loops
D) O(1) — direct access
✅ Answer: B) O(n)
Track first and second max in one pass.
def second_largest(arr): first = second = float('-inf') for n in arr: if n > first: second = first first = n elif n > second and n != first: second = n return second
79
Reverse a linked list. Which approach uses O(1) extra space?
A) Store in array then rebuild
B) Iterative three-pointer technique
C) Recursive approach
D) Sort the linked list
✅ Answer: B) Iterative — O(1) space
Use prev, curr, next pointers. No extra memory needed.
def reverse_list(head): prev = None curr = head while curr: nxt = curr.next curr.next = prev prev = curr curr = nxt return prev
80
Given an array, find the two numbers that add up to a target sum. What is the most efficient approach?
A) Brute force O(n²)
B) Sort then binary search O(n log n)
C) Hash map — O(n)
D) Two-pointer on unsorted — O(n²)
✅ Answer: C) Hash map — O(n)
Store visited numbers in a set/dict and check if complement exists.
def two_sum(nums, target): seen = {} for i, n in enumerate(nums): diff = target - n if diff in seen: return [seen[diff], i] seen[n] = i
81
Write a program to print Fibonacci series up to N terms. What is the space-optimized approach?
A) Store entire series in array — O(n) space
B) Keep only last two values — O(1) space
C) Recursive — O(n) stack space
D) Use a queue
✅ Answer: B) O(1) space
a, b = 0, 1 for _ in range(n): print(a, end=" ") a, b = b, a + b
82
Count occurrences of each character in a string. Which data structure is best?
A) Array of size 26 (for lowercase)
B) Dictionary / HashMap
C) Stack
D) Linked list
✅ Answer: B) Dictionary
from collections import Counter freq = Counter("hello world") # {'l': 3, 'o': 2, 'h': 1, ...}
83
What does this code output?
x = [1, 2, 3]; y = x; y.append(4); print(x)
A) [1, 2, 3]
B) [1, 2, 3, 4]
C) Error
D) [4, 1, 2, 3]
✅ Answer: B) [1, 2, 3, 4]
y = x does NOT copy the list — both y and x point to the same list object. Modifying y also modifies x. This is Python's reference semantics.
84
Find if a number is prime. What is the most efficient method up to √n?
A) Check divisibility up to n — O(n)
B) Check divisibility up to √n — O(√n)
C) Sieve of Eratosthenes for one number
D) Use modulo of n/2
✅ Answer: B) O(√n)
import math def is_prime(n): if n < 2: return False for i in range(2, int(math.sqrt(n)) + 1): if n % i == 0: return False return True
85
Given a string, find the first non-repeating character. E.g., "swiss" → 'w'
A) Build frequency map then scan in order — O(n)
B) Nested loops to check each char — O(n²)
C) Sort the string — O(n log n)
D) Use recursion
✅ Answer: A) O(n)
from collections import Counter def first_unique(s): freq = Counter(s) for ch in s: if freq[ch] == 1: return ch return None
🗄️

Section 6: SQL & DBMS

Q86 – Q93
86
What is the difference between WHERE and HAVING in SQL?
A) No difference
B) WHERE filters rows before grouping; HAVING filters groups after GROUP BY
C) HAVING is faster than WHERE
D) WHERE works only on strings
✅ Answer: B
WHERE filters individual rows before any grouping. HAVING filters after GROUP BY — used with aggregate functions like COUNT, SUM, AVG.
87
Write a query to find employees who earn more than the average salary.
A) SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
B) SELECT * FROM employees HAVING salary > AVG(salary);
C) SELECT AVG(salary) FROM employees WHERE salary > 0;
D) SELECT * FROM employees ORDER BY salary DESC;
✅ Answer: A
SELECT * FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);
88
What is the difference between INNER JOIN and LEFT JOIN?
A) INNER JOIN returns only matching rows; LEFT JOIN returns all rows from left table even without a match
B) They are the same
C) LEFT JOIN is faster
D) INNER JOIN returns all rows from both tables
✅ Answer: A
INNER JOIN = only rows where condition matches in BOTH tables. LEFT JOIN = all rows from left table + matched rows from right (NULLs for no match).
89
What is a foreign key?
A) Key from another database
B) A column that references the primary key of another table
C) An alternate primary key
D) A key that allows NULL values only
✅ Answer: B
A foreign key establishes a relationship between two tables. It references the primary key of another table to maintain referential integrity.
90
Write a query to find the second highest salary from an Employee table.
A) SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);
B) SELECT salary FROM employees ORDER BY salary DESC LIMIT 1;
C) SELECT MIN(salary) FROM employees;
D) SELECT salary FROM employees GROUP BY salary;
✅ Answer: A
SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees);
91
What does the GROUP BY clause do in SQL?
A) Sorts the results
B) Groups rows with the same values into summary rows for aggregate functions
C) Filters duplicate rows
D) Joins multiple tables
✅ Answer: B
GROUP BY groups rows sharing a value so aggregate functions (COUNT, SUM, AVG) can be applied per group. Example: count employees per department.
92
What is the difference between DELETE, DROP, and TRUNCATE in SQL?
A) DELETE removes rows (can rollback); TRUNCATE removes all rows (faster, no rollback); DROP removes the entire table
B) They are all the same
C) DROP is reversible, DELETE is not
D) TRUNCATE removes the table structure
✅ Answer: A
DELETE: removes specific rows, logged, can be rolled back. TRUNCATE: removes all rows instantly, not easily rolled back. DROP: removes the entire table including its structure.
93
What is an index in a database and why is it used?
A) It sorts data alphabetically
B) It speeds up data retrieval by creating a lookup structure
C) It encrypts the table
D) It is used to join tables
✅ Answer: B
A database index is like a book's table of contents — it allows the database engine to find rows quickly without scanning the entire table. It speeds up SELECT queries but slightly slows INSERT/UPDATE.
🤝

Section 7: HR Interview Questions

Q94 – Q100
94
Tell me about yourself. What should you focus on?
A) Your entire life story
B) Your family background
C) Education → Skills → Projects → Why Cognizant
D) Your hobbies only
✅ Best Approach
Structure: Name + degree + college → key technical skills → most relevant project → why you want to work at Cognizant. Keep it to 90 seconds. End with enthusiasm about the role.
95
Why do you want to work at Cognizant?
A) "Because it pays well"
B) Mention Cognizant's work culture, learning opportunities, digital transformation projects
C) "I applied everywhere"
D) "It's close to my home"
✅ Best Approach
Talk about Cognizant's focus on digital transformation, cloud, AI, and their global presence. Mention how their GenC/GenC Next training programs align with your goal of building a strong technical foundation early in your career.
96
What is your greatest weakness?
A) "I have no weaknesses"
B) "I work too hard"
C) Name a real weakness + what you're doing to improve it
D) "I hate working in teams"
✅ Best Approach
Be honest but strategic. Example: "I sometimes struggle with public speaking, but I've been joining group discussions and tech meetups to practice. I've noticed a visible improvement in the last few months." Shows self-awareness + initiative.
97
Where do you see yourself in 5 years?
A) "Running my own company"
B) "In your position"
C) "Growing into a technical lead role within Cognizant, specializing in cloud/AI"
D) "Retired"
✅ Best Approach
Show ambition but tie it to Cognizant's growth. Example: "I want to develop expertise in cloud solutions and eventually contribute as a solution architect. I see Cognizant as the perfect place to grow because of your training programs and global projects."
98
Describe a situation where you worked in a team to solve a problem. (STAR method)
A) Make up a story
B) Say you always work alone
C) Use Situation → Task → Action → Result format with a real example
D) Keep it vague
✅ Best Approach
Use the STAR method: Situation (project context) → Task (your role) → Action (what you did specifically) → Result (measurable outcome). Example: College project where your team was stuck on a bug and you led the debugging session, reducing submission delay from 2 days to 6 hours.
99
Are you comfortable relocating?
A) "Yes, I am open to relocation" (if true)
B) Refuse without explanation
C) Negotiate aggressively
D) Ask them to confirm your city first
✅ Best Approach
Cognizant often posts across multiple cities. If you're open to relocation, say so clearly and positively: "Yes, I'm open to working wherever the opportunity is. I believe exposure to different work environments will help me grow faster."
100
Do you have any questions for us? (End of interview)
A) "No, I'm good"
B) Ask about salary immediately
C) Ask about the team, training program, or a recent Cognizant project
D) Ask when you'll get the offer letter
✅ Best Approach
Always have 1–2 thoughtful questions ready. Examples: "What does the typical learning curve look like for a GenC associate in the first 6 months?" or "What technologies does the team I'd be joining primarily work with?" This shows genuine interest and preparation.

🎯 Ready to Crack the Cognizant OA?

You've just gone through 100 real questions. Now it's time to practice under timed conditions. Accuracy + Speed = Selection.

✅ No negative marking — attempt everything
⏱️ Practice with a timer daily
💡 Revise weak topics every 3 days

TCS Interview Questions 2026 – Real HR, Technical & Managerial Round Questions

"Sir, what happens in the TCS interview?" — This is the most common question every student asks after clearing TCS NQT. This blog gives you the real answers — from students who actually sat in the interview room in 2026.

You cleared the TCS NQT. Now comes the interview.

This is where most students get confused. They don't know what to expect. They prepare the wrong things. They get nervous for no reason.

The truth is — the TCS interview is very structured. Once you know what they ask, it becomes much less scary.

This blog covers everything — TCS HR Round questions, TCS Technical Round topics, and TCS Managerial Round — with real questions from actual 2026 TCS interviews for Digital and Prime roles.

Interview Structure

TCS Interview Structure 2026

Before we go into each round, understand this simple structure. TCS campus interviews have 3 rounds — all on the same day:

👩‍💼
Round 1
HR Round
Personality & fit check
💻
Round 2
Technical Round
Projects, SQL, coding
🤝
Round 3
Managerial Round
Attitude & flexibility

The good news? Most students who cleared TCS NQT also clear the interview — because TCS is looking for attitude and willingness to learn, not perfection.

HR Round

Round 1 — TCS HR Round Questions (with Answers)

The HR round is a simple 15–20 minute conversation. They are checking if you are genuine, confident, and a good fit for TCS culture.

Here are the most common TCS HR interview questions with tips on how to answer each:

HR Round Questions Asked in TCS 2026

  • Tell me about yourself — Prepare a 90-second answer: name, college, branch, key skills, one project, and why TCS.
  • Why did you choose this college? — Be honest. Keep it short and positive.
  • What do you know about TCS? — Mention TCS's size (largest IT company in India), its digital transformation work, global presence in 50+ countries, and its focus on fresher hiring.
  • Why do you want to join TCS? — Don't say "big company." Say: learning opportunities, global exposure, strong training program for freshers.
  • What are your strengths and weaknesses? — Give a real weakness. Always say how you are working to improve it.
  • What are your hobbies and interests? — Be genuine. If you say "coding," be ready to talk about it.
  • Why should we hire you? — Combine your skills, your attitude to learn, and your enthusiasm. Keep it to 60 seconds.
Pro Tip for HR Round: The biggest mistake students make is memorising answers word by word. The interviewer can tell. Instead, understand what each answer should communicate — then speak naturally. Practise out loud, not on paper.
Technical Round

Round 2 — TCS Technical Round Questions

This is the round students fear most. But here is the truth — TCS technical interviews mostly stay close to your resume and projects. They rarely go into deep DSA or system design for freshers.

Technical Topics Asked in TCS Digital & Prime 2026

  • Your Project Deep Dive — What did you build? What technology? How does the backend work? What problems did you face?
  • Networking Questions — API Gateway, IP Address, how a browser connects to a server (DNS → TCP → HTTP)
  • Spring Boot Concepts — For Java students: annotations, REST API, auto-configuration basics
  • SQL Queries — Joins, Subquery, Indexing, EXISTS, NOT EXISTS, IN, NOT IN, GROUP BY, HAVING
  • SQL Set Operations — Union, Union All, Intersect, Minus — know the differences
  • Basic Coding Problem — "Write a code to return the second maximum element"
  • Cloud Computing Basics — What is cloud? Public vs Private vs Hybrid. Basic understanding is enough.

SQL Topics You Must Revise Before TCS Technical Interview

SQL is asked in almost every TCS technical interview. These are the exact topics that come up most frequently:

SQL TopicWhat to KnowDifficulty
JoinsINNER, LEFT, RIGHT, FULL OUTER — know with examplesMust Know
SubqueryNested SELECT, correlated subqueryMust Know
IndexingWhy index speeds up queries, clustered vs non-clusteredMust Know
EXISTS / NOT EXISTSDifference from IN / NOT IN, when to use whichImportant
GROUP BY / HAVINGDifference between WHERE and HAVINGMust Know
Union vs Union AllUnion removes duplicates, Union All keeps themImportant
Intersect / MinusCommon rows vs difference between result setsGood to Know
Managerial Round

Round 3 — TCS Managerial Round Questions

Managerial Questions in TCS 2026

The most relaxed round. They are checking attitude, flexibility, and if you will fit into TCS work culture.

  • How many family members do you have?
  • Are you vegetarian or non-vegetarian? — No right answer. Just be honest.
  • Any location preferences? — "No preference" is the safest and best answer.
  • What are your strengths and weaknesses?
  • What are your hobbies and interests?
  • Why should we hire you? — Your final chance to make an impression.

The Managerial round rarely eliminates candidates. Think of it as a final check. Be relaxed, be natural, be honest.

Real Experience

Real TCS Interview Experience — A Student's Story

One of our CampusMonk students shared exactly what happened in their TCS Technical Round in 2026. This is one of the most valuable things you can read before your interview.

Technical Round — Actual Questions Asked (Student's Own Words)

1 Interviewer asked: "Do you know about Cloud Computing?" — Student replied: "I know the basics but not in-depth." Interviewer said "OK" and moved on. Don't lie. Honesty works.
2 Asked Networking questions — API Gateway, IP address, how browser connects with the server.
3 Spring Boot related questions asked (student had Java in their resume).
4 Asked to connect project with backend code. Student said MySQL not implemented yet — interviewer said "OK" and continued. Partial knowledge is fine. Don't freeze.
5 "Write a code to return the second maximum element." Student wrote it correctly with just one small semicolon syntax error — still cleared the round.
6 Personal question: "Why not defence exams since your father is in the army?" — Student said: "My passion is in IT." Short, honest, confident answer.
What this experience teaches us: TCS interviewers are not trying to fail you. They want to see how you think under pressure, how honest you are, and whether you can communicate clearly. You don't need to know everything — just know what you've put on your resume, be genuine, and stay calm.
Free Video

Watch This Free Video Before Your TCS Interview

This free YouTube session covers real TCS interview questions from Digital and Prime roles in 2026 — HR Round, Technical Round, and Managerial Round in one complete video.

CampusMonk — Free YouTube Session

TCS Interview Questions | Prime & Digital
Actual Experience + Real Questions 2026

Real questions. Real answers. Real student experiences.
HR + Technical + Managerial Round — all in one video. Completely free.

Watch Free on YouTube

youtu.be/Cu4q7loj_Vk

Golden Tips

8 Golden Tips to Clear Your TCS Interview

These are not generic tips. These come from students who sat in real TCS interviews and the questions they got wrong — or right.

Tip 01

Be honest about what you don't know. Saying "I'm not sure, but I'd approach it this way" is far better than guessing wrong.

Tip 02

Know your project inside out. Every technology on your resume is a potential question. If you put Java, be ready to write Java code.

Tip 03

Practise speaking out loud. Preparing silently is not enough. Record yourself answering, then listen back critically.

Tip 04

Dress formally and arrive 15 minutes early. First impressions shape the entire interview, especially in HR round.

Tip 05

Show your thinking, not just your answer. If stuck on coding, say what you're thinking. Interviewers value problem-solving approach.

Tip 06

Revise SQL the night before. Joins, Subqueries, Indexing — these come up in almost every TCS technical interview.

Tip 07

Prepare 2 questions to ask the interviewer. "What does a typical day look like for a fresher?" shows genuine interest.

Tip 08

Stay calm in Managerial round. It's mostly a conversation. Relax. Be yourself. There are no wrong answers about your family or food preferences.

FAQ

Frequently Asked Questions — TCS Interview 2026

These are the questions that students ask most about the TCS interview process. The FAQ schema on this page means Google may show these answers directly in search results.

How many rounds are there in TCS interview?
TCS interview has 3 rounds — HR Round, Technical Round, and Managerial Round. All three rounds typically happen on the same day. Most students who clear TCS NQT also clear the interview.
What questions are asked in TCS HR Round?
Common TCS HR round questions include: Tell me about yourself, Why do you want to join TCS, What do you know about TCS, What are your strengths and weaknesses, Why should we hire you, and questions about hobbies and interests.
What SQL topics come in TCS Technical Interview?
TCS technical interviews commonly ask about: Joins (Inner, Left, Right, Full), Subqueries, Indexing, EXISTS and NOT EXISTS, IN and NOT IN, GROUP BY with HAVING, Union vs Union All, Intersect, and Minus. Revise all these before your interview.
Is TCS Managerial Round eliminatory?
The TCS Managerial Round rarely eliminates candidates. It checks your attitude, flexibility, and personality. Questions include location preference, family details, and hobbies. Just be natural and honest — there are no wrong answers here.
What is the difference between TCS Digital and TCS Prime interview?
Both have a similar 3-round interview structure. TCS Digital (higher package ~7 LPA) may have slightly more technical depth — especially in advanced SQL, cloud basics, and project explanation. TCS Prime is the standard fresher role (~3.36 LPA) with more general technical questions.
What coding questions come in TCS technical interview?
TCS typically asks 1 basic coding question in the technical round. Common ones: find the second maximum element, reverse a string, check palindrome, print Fibonacci series, or factorial. These are medium-easy problems. Focus on logic and clean code — not advanced DSA.

Final Words

The TCS interview is not as scary as it looks from outside.

They are not trying to fail you. TCS is looking for students who are genuine, curious, and willing to learn.

You don't need to know everything. You need to know your basics well, explain your project clearly, and communicate honestly.

Know your project. Revise SQL. Practise your self-introduction. And walk in with a smile.

All the best. You've got this. 💪

Deloitte 2025 Placement Syllabus: Complete Guide for Engineering and MCA Students

Deloitte 2025 Placement Syllabus: Complete Guide for Engineering and MCA Students

If you are preparing for Deloitte’s placement drive in 2025, this guide will help you understand the latest syllabus, exam structure, and how to prepare section-by-section. Whether you’re from an Engineering background or pursuing an MCA, this article simplifies the Deloitte assessment process with accurate information and easy-to-understand tips.

Deloitte 2025 Placement Overview

Deloitte conducts a structured placement process that includes multiple assessments. These tests evaluate your aptitude, technical understanding, and problem-solving skills. The syllabus has recently been updated to include dedicated sections with time limits.

Each section has a defined duration and number of questions, and all sections are equally important for selection.

Aptitude Test Breakdown

SectionTime LimitNo. of QuestionsType of Questions
Numerical Ability12 minutes12Percentages, Ratios, Time-Speed-Distance, Averages
Logical Reasoning10–12 mins10Series, Puzzles, Blood Relations
Verbal Ability10–12 mins10Grammar, Sentence Correction, Reading Comprehension

These topics are common in most aptitude exams, but Deloitte’s test often emphasizes speed and accuracy.

Technical MCQ Round

This section evaluates your programming basics and technical knowledge. The questions are based on:

Tip: Choose your programming language wisely. Answering questions in the language you’re most comfortable with can improve your accuracy and speed.

Coding Round (Technical Skills)

In this round, you will be tested on your coding proficiency. Candidates are required to solve 1–2 coding questions within a given time frame.

Key topics to prepare:

Most problems will test your logical approach and the efficiency of your solution.

Time Management Strategy

Since each section has a fixed duration, managing your time is key. Here’s a quick overview:

Test ComponentSuggested Focus
AptitudePractice daily using mock tests
Verbal AbilityImprove vocabulary and reading speed
Logical ReasoningSolve puzzles and pattern-based questions
Technical MCQRevise CS fundamentals regularly
Coding RoundPractice writing code without IDE

Final Thoughts

The Deloitte 2025 syllabus is designed to test your ability to think critically, solve problems efficiently, and apply technical knowledge under pressure. The best way to prepare is to stay consistent, identify your weak areas early, and give regular mock tests.

Approach the test with a clear strategy, and keep practicing questions from each topic. With regular effort and the right preparation plan, cracking Deloitte’s placement process in 2025 is completely achievable.

Stay focused, stay sharp, and give it your best shot.

Capgemini on campus Hiring Process 2025: Full Overview and Preparation Plan

If you’re preparing for Capgemini’s recruitment drive in 2025, it’s important to know how the selection process works. This article explains each step involved, the roles being offered, and how you can get ready for each round.

Job Profiles and Compensation

Capgemini is hiring fresh graduates for the following roles:

RoleSalary Package (CTC)
Analyst₹4.25 LPA
Analyst Star₹5.75 LPA
Senior Analyst₹7.5 LPA

Your profile will be based on your scores during the selection rounds.

Selection Rounds

Capgemini’s hiring process includes five rounds. Each round is compulsory, and students are shortlisted based on performance at every step.

RoundTypeModeDetails
1Cognitive + Technical MCQsOn-CampusTests general aptitude and technical knowledge
2Essay Writing (WET)On-CampusA formal essay on a topic given at the time of exam
3Coding AssessmentOn-CampusOnly for high-salary roles; includes coding questions
4Spoken English TestVirtualTests fluency and spoken English using AI tools
5Technical InterviewVirtualPanel discussion on subjects, project, and scenarios

Round Details

Round 1: Cognitive and Technical Questions

This part checks your ability to solve problems using logic, language, and math. Technical questions may cover:

Round 2: Essay Writing

This writing round includes one topic. You’ll have about 20–30 minutes to write an essay that includes:

Sample Topics:

Round 3: Coding (For Analyst Star & Senior Analyst)

You’ll be asked to write programs using languages like C, C++, Java, or Python. Questions test your logic and coding efficiency.

Topics to practice:

Round 4: Spoken English

This is an AI-based round that checks how well you speak and understand English. You will be tested on:

Round 5: Interview

This session is led by experienced professionals. They will ask about:

How to Prepare

AreaFocus Areas
Core SubjectsRevise DBMS, OOP, networking, and programming fundamentals
CodingPractice on platforms like LeetCode and HackerRank
Writing SkillsWrite one essay every few days to improve structure and grammar
Spoken EnglishPractice daily speaking in English to improve fluency
Interview PrepBe ready to talk about your project and explain your decisions

Final Thoughts

Capgemini’s hiring steps are clear and well-structured. With consistent preparation, clear understanding, and regular practice, you can improve your chances of getting selected. Start early, focus on one section at a time, and keep improving day by day.

Stay calm during the tests, give your best, and believe in your preparation.

How to Prepare for Cognizant? Step by Step RoadMap

Introduction

Cognizant has officially started its hiring for the 2025 batch, opening doors for lakhs of students across the country. Whether you are a fresher targeting your first job or a final-year student preparing for placements, this is your chance to land a dream role at a reputed IT company.

This article gives you the complete roadmap, leaked syllabus breakdown, and clear insights on how to prepare for Cognizant hiring effectively. 

Watch the complete video guide here:
Cognizant Complete Roadmap | Syllabus Leaked | Which Cluster to Select

Job Roles Offered by Cognizant

Cognizant hires freshers primarily for the following roles:

1. GenC

Entry-level profile for candidates with basic technical knowledge. It involves minimal coding.

2. GenC Elevate

For students with solid programming and problem-solving abilities.

3. GenC Next

Premium role with advanced-level expectations, including project experience and strong system-level understanding.

Eligibility Criteria

To apply for Cognizant Hiring 2025:

Selection Process (Step-by-Step)

  1. Communication Test
    • Grammar, reading comprehension, sentence correction
    • Email writing and vocabulary-based questions
  2. Aptitude & Logical Reasoning Test
    • Topics: Percentages, Ratios, Time-Speed-Distance, Data Interpretation, Series, Puzzles
  3. Technical Assessment
    • MCQs on programming concepts, basic CS subjects (DBMS, OS, OOPs)
    • 1–2 coding questions (for Elevate and Next roles)
  4. Interviews
    • Technical Interview: Projects, programming, CS fundamentals
    • HR Interview: Personality, communication, willingness to relocate

Roadmap to Crack Cognizant 2025

Here’s a simplified preparation roadmap based on the video content and latest trends:

Phase 1: Understand the Hiring Flow

Phase 2: Focused Preparation for Each Round

RoundWhat to Study
Communication SkillsGrammar rules, paragraph reading, email writing, listening comprehension
Quantitative AptitudeSimplification, number series, time & work, profit-loss, data interpretation
Logical ReasoningSyllogisms, blood relations, puzzles, number/letter patterns
Programming (MCQs)C, C++, Java basics, OOPs, Data Structures, time complexities
Coding (for Elevate/Next)Arrays, strings, recursion, sorting, searching, simple DSA problems

Phase 3: Practice and Mock Tests

Phase 4: Interview Readiness

Syllabus Breakdown (Leaked Syllabus 2025)

Below is a compiled and updated syllabus breakdown based on the current hiring pattern:

Communication Section:

Aptitude Section:

Logical Reasoning Section:

Technical Section:

Salary Package Overview

RoleExpected Salary Package
GenC₹4 LPA
GenC Elevate₹5.4 LPA
GenC Next₹6.75 LPA and above

Note: Actual salary may vary based on location and performance in interview rounds.

Final Thoughts

Cognizant’s 2025 hiring process is a golden opportunity for students to start their careers in one of the top IT companies in India. With a clear roadmap, consistent practice, and smart preparation, you can crack any of the roles.

For a detailed walkthrough, syllabus discussion, and cluster selection tips, don’t miss this video:

🎥 Cognizant Complete Roadmap | Syllabus Leaked | Which Cluster to Select

TCS NQT 2025 Actual Coding Questions with Shift-wise (Java Solution)

TCS NQT – October 3rd, 2024 (Shift 1)


Question 1: Weekly Exercise Summary

Problem Statement:
You have to design a weekly exercise summary by taking the number of minutes of daily exercise for 7 consecutive days.
The exercise duration for all days will be entered by the user.

Your task is to:

  1. Calculate the total exercise duration for the week
  2. Calculate the average daily workout duration (rounded to nearest integer)

Input Format:

Day 1 exercise duration: <minutes> Day 2 exercise duration: <minutes> ... Day 7 exercise duration: <minutes> 

Output Format:

Exercise summary Total exercise duration : <total> (minutes) Average daily exercise duration: <average> minutes 

Example Input:

Day 1 exercise duration: 45 Day 2 exercise duration: 15 Day 3 exercise duration: 30 Day 4 exercise duration: 15 Day 5 exercise duration: 5 Day 6 exercise duration: 10 Day 7 exercise duration: 20 

Example Output:

Exercise summary Total exercise duration : 140 (minutes) Average daily exercise duration: 20 minutes 


Solution (Java):

import java.util.Scanner;

public class ExerciseSummary {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] exerciseDuration = new int[7];
        int total = 0;
        
        for (int i = 0; i < 7; i++) {
            System.out.print("Day " + (i + 1) + " exercise duration: ");
            exerciseDuration[i] = scanner.nextInt();
            total += exerciseDuration[i];
        }
        
        double average = total / 7.0;
        average = Math.round(average * 100.0) / 100.0;
        
        System.out.println("Exercise Summary");
        System.out.println("Total exercise duration: " + total + " minutes");
        System.out.println("Average daily exercise duration: " + average + " minutes");
        
        scanner.close();
    }
}

Question 2: Problem Statement:
You are given a range of integers from M to N (inclusive), where:

Your task is to find all palindrome numbers in the range and return the count of such numbers.

Input Format:

Enter M : <lower limit integer> Enter N : <upper limit integer> 

Output Format:

<number of palindrome numbers> 

Definition:
palindrome number is a number that reads the same backward as forward.
Example: 121, 131, 11, 9

Example Input:

Enter M : 10 Enter N : 20 

Example Output:

Explanation:
Only one palindrome exists between 10 and 20 → 11


Solution (C++):

#include <iostream>
using namespace std;

bool isPalindrome(int number) {
    if (number < 0) return false;
    int original = number, reversed = 0;
    while (number > 0) {
        reversed = reversed * 10 + number % 10;
        number /= 10;
    }
    return original == reversed;
}

int main() {
    int M, N;
    cout << "Enter M: ";
    cin >> M;
    cout << "Enter N: ";
    cin >> N;
    int count = 0;
    for (int i = M; i <= N; i++) {
        if (isPalindrome(i)) count++;
    }
    cout << count << endl;
    return 0;
}

TCS NQT – October 3rd, 2024 (Shift 2)

 

Question 3: Train Travel Time
Problem: A train covers 800 meters (400m track + 400m bridge) at a given speed (km/hr). Calculate the time taken in seconds using the formula: (Total distance / Speed) * (18/5).


Solution (C++):

#include <iostream>
using namespace std;

int main() {
    double speed;
    cin >> speed;
    int totalDistance = 800;
    double speedMs = speed * 5.0 / 18.0; // Convert km/hr to m/s
    int time = totalDistance / speedMs;
    cout << time << endl;
    return 0;
}

Question 4: Split Array with Equal Averages
Problem: Given an array of integers, check if it can be split into two subarrays with equal averages. Output true or false.


Solution (Java):

import java.util.Scanner;

public class ArraySplit {
    public static boolean canSplit(int[] arr, int n) {
        int totalSum = 0;
        for (int i = 0; i < n; i++) totalSum += arr[i];
        int leftSum = 0;
        for (int i = 0; i < n - 1; i++) {
            leftSum += arr[i];
            int rightSum = totalSum - leftSum;
            if (leftSum * (n - i - 1) == rightSum * (i + 1)) return true;
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) arr[i] = sc.nextInt();
        System.out.println(canSplit(arr, n) ? "true" : "false");
        sc.close();
    }
}
https://youtube.com/watch?v=3YfX4gTBJzc%3Fsi%3DLCUGvXUGZKBI7Jmn

TCS NQT – October 4th, 2024 (Shift 1)


Question 5: Perfect Donation Amount
Problem: Check if a donation amount is a perfect number (sum of its proper divisors equals the number). Return true if perfect, false otherwise.


Solution (Java):

import java.util.Scanner;

public class PerfectNumber {
    public static boolean isPerfect(int num) {
        int sum = 0;
        for (int i = 1; i <= Math.sqrt(num); i++) {
            if (num % i == 0) {
                sum += i;
                if (num / i != i && num / i != num) sum += num / i;
            }
        }
        return sum == num;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        System.out.println(isPerfect(num));
        sc.close();
    }
}

Question 6: Inventory Frequency Counter
Problem: Given a string of space-separated item names, count the frequency of each item. If the input contains digits, output “Invalid input.”


Solution (Java):

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class InventoryManager {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        Map<String, Integer> freq = new HashMap<>();
        String word = "";
        
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) >= '0' && s.charAt(i) <= '9') {
                System.out.println("Invalid input");
                return;
            } else if (s.charAt(i) == ' ') {
                if (!word.isEmpty()) freq.put(word, freq.getOrDefault(word, 0) + 1);
                word = "";
            } else {
                word += s.charAt(i);
            }
        }
        if (!word.isEmpty()) freq.put(word, freq.getOrDefault(word, 0) + 1);
        
        for (Map.Entry<String, Integer> entry : freq.entrySet()) {
            System.out.println(entry.getKey() + " " + entry.getValue());
        }
        sc.close();
    }
}

TCS NQT – October 4th, 2024 (Shift 2)


Question 7: Calculate Speed in km/hr
Problem: Given a distance of 1000 meters and time in seconds, calculate the speed in km/hr.


Solution (C++):

#include <iostream>
using namespace std;

int main() {
    double time;
    cin >> time;
    double distance = 1000.0; // meters
    double speedMs = distance / time; // m/s
    double speedKmh = speedMs * 18.0 / 5.0; // Convert m/s to km/hr
    cout << speedKmh << endl;
    return 0;
}

Question 8: Jump Game
Problem: Given an array where each element is the maximum jump length from that index, check if you can reach the last index from the first index.


Solution (Java):

import java.util.Scanner;

public class JumpGame {
    public static boolean canJump(int[] nums) {
        int maxReach = 0;
        for (int i = 0; i < nums.length && i <= maxReach; i++) {
            maxReach = Math.max(maxReach, i + nums[i]);
            if (maxReach >= nums.length - 1) return true;
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String[] s = input.split(",");
        int[] nums = new int[s.length];
        for (int i = 0; i < s.length; i++) {
            nums[i] = Integer.parseInt(s[i].trim());
        }
        System.out.println(canJump(nums));
        sc.close();
    }
}

Tips for TCS NQT Success

Actually TCS CODING QUESTION Asked Shift wise 2024 (Video Solution)

TCS NQT 2024 Coding Questions Shift-wise with Video Solution


Q1: Problem Statement:
A device named ABC is placed on a rectangular grid with M rows and N columns.
The device starts at the top-left corner (1, 1) and must reach the bottom-right corner (M, N).
The device can only move East (→) or South (↓) at any step.

However, some cells are blocked (obstacles), and the device cannot pass through them.

Your task is to calculate the total number of unique paths from (1, 1) to (M, N) while avoiding all blocked cells.

Input Format:

Output Format:

Constraints:

Example Input:

3 3 1 2 2 

Example Output:

Explanation:

The possible paths from (1,1) to (3,3) are:

The path that goes through (2,2) is blocked.

https://www.youtube.com/embed/IfOcCTwUqqQ?si=dM1eRFSKtW1CbnzZ

Q2. Problem Statement:
You are given a list of n items sold in a store.
Each item has the following details:

Your task is to compute the following:

  1. Total Sales Price — sum of (unit price × quantity) for all entries.
  2. Average Sales Price — (Total Sales Price) ÷ n
  3. Top Selling Product — item name with the highest total quantity sold (combine duplicates).

Input Format:

Output Format:

Example Input:

4 Apple 1.0 10 Orange 5.0 5 Banana 4.5 8 Apple 1.0 5 

Example Output:

87.5 21.88 Apple

https://youtube.com/watch?v=Maoo3haRJ2o%3Fsi%3DnZ9qfRJhADjAFW3E

Q3. Problem Statement:
You are given an integer N.
Your task is to print the sum of the multiplication table of N, up to N × 10.

Input Format:

Output Format:

Example Input:

10 

Example Output:

550 

Explanation:

Multiplication table of 10 up to 10:

10 × 1 = 10 10 × 2 = 20 10 × 3 = 30 ... 10 × 10 = 100 

Sum = 10 + 20 + 30 + … + 100 = 550

Q4. Problem Statement:
You are given an array of integers and a number K.
Your task is to print the maximum element in every contiguous subarray of size K.

Input Format:

Output Format:

Constraints:

Example Input:

1 4 7 7 6 8 3 

Example Output:

7 7 7 8 

Explanation:

Subarrays of size 3:

https://youtube.com/watch?v=Pr3L2AX49yc%3Fsi%3DhfTBvUbJuWOE_jbp

TCS Actual Coding Question | How to Take input?  | 29 April

Q5. Problem Statement:
You are given an integer N.
Your task is to calculate the sum of the first N terms of the Fibonacci series.

The Fibonacci series is defined as:
0, 1, 1, 2, 3, 5, 8, 13, ...
(i.e., F(0) = 0F(1) = 1F(n) = F(n-1) + F(n-2) for n ≥ 2)


Input Format:

Output Format:

Constraints:

Example Input:

Example Output:

Explanation:
Fibonacci terms: 0, 1, 1, 2, 3
Sum = 0 + 1 + 1 + 2 + 3 = 7


Q6: Problem Statement:
You are given an array of integers.
Your task is to perform bitwise OR operation on all possible subarrays and return the number of distinct results obtained.

Input Format:

Output Format:

Constraints:

Example:

Input:

1 2 3 

Output:

Explanation:
Subarrays and their Bitwise OR values:

https://youtube.com/watch?v=g3wmf0_8xRs%3Fsi%3DO0uiJNKwECVZfyjP

TCS Actual Coding Question | How to Take input?  | 30 April

Q7. Problem Statement:

You are given a database of student records. Each student record contains the following details:

Your Task:

  1. Return the names of all students whose age is greater than 20.
  2. Return the average grade of all Female students in terms of their ASCII values (and then return the average as an integer).

Input Format:

First line contains an integer N — number of students Next N lines contain student records in the format: Name Age Grade Gender 

Output Format:

Example Input:

3 AAA 21 A Female BBB 24 B Male CCC 26 C Female 

Example Output:

['AAA', 'BBB', 'CCC'] 66 

Explanation:

https://youtube.com/watch?v=bmLemCza3WI%3Fsi%3D4gdfjRdflWoYpuwI

TCS Actual Coding Question | 03 April  | Shift 01

Q8. Problem Statement:
The organization has a data warehouse that stores 3-digit numbers.
Your task is to write a program that checks whether a given 3-digit number is divisible by 9 or not.

Input Format:

Output Format:

Constraints:

Examples:

Input:

236 

Output:

Number 236 is not divisible by 9 

Input:

162 

Output:

Number 162 is divisible by 9

Q9. Problem Statement:
You are given a list of numbers.
Your task is to return the maximum difference between a smaller number that appears before a larger number in the list.

Note:

Input Format:

Output Format:

Example Input:

7 -3 -5 1 6 -7 8 11 

Example Output:

18 

Explanation:

https://youtube.com/watch?v=WHMesBqzgcw%3Fsi%3DWMixozQY9kRwX-qJ

TCS Actual Coding Question | 03 April  | Shift 02

Q10: Problem Statement:
A person has many shoes of different sizes and orientations (Left ‘L’ or Right ‘R’).
You are given a list of shoes represented as size followed by either ‘L’ or ‘R’.
Your task is to calculate how many valid pairs of shoes can be formed.
A valid pair is made of one left and one right shoe of the same size.

Input Format:

Output Format:

Constraints:

Example 1:

Input: 8 7L 7R 7L 8L 6R 7R 8R 6R Output: 3 

Explanation:

Example 2:

Input: 5 7R 7L 8R 10R 10L Output: 2 

Explanation:

Q11. Problem Statement:
In a company, there are employees and their efficiencies are given in an array arr.
Each element represents the efficiency of an employee and can be negative.

Your task is to select any 3 employees such that the product of their efficiencies is maximum.

Input Format:

Output Format:

Constraints:

Example 1:

Input: 5 -3 7 8 1 0 Output: 56 

Explanation:
Maximum product = 7 × 8 × 1 = 56

Example 2:

Input: 5 -3 -2 4 8 1 Output: 64 

Explanation:
Maximum product = (-3) × (-2) × 8 = 48
Also try 4 × 8 × 1 = 32
But (-3 × -2 × 8) = 48
Correction: Actually (-3 × -2 × 8) = 48
Typo in the image: 64 is incorrect unless the array is different.

Key Insight:

https://www.youtube.com/embed/UPYu1OqAC3U?si=yeS3ytmB–vaeqfA