InternDoor

EXL interview prep

6 practice questions on the topics candidates reported from EXL interviews, with answers. The questions are ours; each one links to the interview report that names its topic.

Practise them as a timed round45 roles open at EXL

DSA 1

  1. DSAMedium

    For which of these problems does a greedy choice always give an optimal answer?

    1. 0/1 knapsack, always taking the most valuable item that still fits
    2. The most meetings that fit in one room without overlap, always taking the meeting that ends earliest
    3. Making 6 from coins of 1, 3 and 4 with the fewest coins, always taking the largest coin
    4. The longest simple path in a graph, always taking the heaviest edge
    Show the answer

    B. The most meetings that fit in one room without overlap, always taking the meeting that ends earliest

    Earliest-finish-first is provably optimal for activity selection. Greedy fails the others: coins 4 + 1 + 1 uses 3 coins where 3 + 3 uses 2, and 0/1 knapsack needs dynamic programming.

    This topic is named in a candidate’s interview report: On-campus interview, 2020, on GeeksforGeeks.

DBMS and SQL 2

  1. DBMS and SQLEasy

    Which of these SQL functions is an aggregate function rather than a scalar one?

    1. UPPER(name)
    2. LENGTH(name)
    3. AVG(salary)
    4. ROUND(price, 2)
    Show the answer

    C. AVG(salary)

    An aggregate function such as AVG, SUM, COUNT, MIN or MAX turns many rows into one value. A scalar function works on one value per row, as UPPER, LENGTH and ROUND do.

    This topic is named in a candidate’s interview report: Analytics on-campus interview, 2015, on GeeksforGeeks.

  2. DBMS and SQLMedium

    Which query finds employees named "rahul" whatever the letter case is in the table (Rahul, RAHUL, rahul)?

    1. SELECT * FROM emp WHERE name = 'RAHUL' OR 'rahul';
    2. SELECT * FROM emp WHERE name LIKE 'rahul' CASE OFF;
    3. SELECT * FROM emp WHERE CASE(name) = 'rahul';
    4. SELECT * FROM emp WHERE LOWER(name) = 'rahul';
    Show the answer

    D. SELECT * FROM emp WHERE LOWER(name) = 'rahul';

    Lower-casing the column makes the comparison case-insensitive in any database. (In MySQL with a default case-insensitive collation, a plain = already ignores case, but LOWER works everywhere.)

    This topic is named in a candidate’s interview report: Analytics on-campus interview, 2015, on GeeksforGeeks.

Aptitude 3

  1. AptitudeMedium

    Using each of 8, 8, 3 and 3 exactly once, with +, -, * and / and brackets, which expression equals 24?

    1. (8 + 8) * 3 / 3
    2. 8 * 3 - 8 + 3
    3. 8 / (3 - 8 / 3)
    4. (8 - 3) * (8 - 3)
    Show the answer

    C. 8 / (3 - 8 / 3)

    8 / 3 is 8/3, so 3 - 8/3 = 1/3, and 8 divided by 1/3 is 24. The others give 16, 19 and 25. The trick is that the answer needs a fraction on the way.

    This topic is named in a candidate’s interview report: Analytics on-campus interview, 2017, on GeeksforGeeks.

  2. AptitudeMedium

    You have a 4-litre and a 7-litre jug and unlimited water. Fill the 4 and pour it into the 7. Fill the 4 again and pour into the 7 until the 7 is full. How much is left in the 4-litre jug?

    1. 1 litre
    2. 0 litres
    3. 3 litres
    4. 2 litres
    Show the answer

    A. 1 litre

    The 7 holds 4 after the first pour, so it takes only 3 more, leaving 1 in the 4-litre jug. Empty the 7, pour in that 1 litre, then fill the 4 and pour it in: the 7 now holds exactly 5 litres.

    This topic is named in a candidate’s interview report: Analytics on-campus interview, 2015, on GeeksforGeeks.

  3. AptitudeMedium

    How many squares of any size are there on an 8 x 8 chessboard?

    1. 64
    2. 204
    3. 196
    4. 260
    Show the answer

    B. 204

    There are (9 - k)^2 squares of side k: 64 + 49 + 36 + 25 + 16 + 9 + 4 + 1 = 204.

    This topic is named in a candidate’s interview report: Analytics on-campus interview, 2015, on GeeksforGeeks.

Prep for other employers

All employers
See who is hiring after EXL

Engineering internships and entry-level jobs in India, newest first.