InternDoor

Deloitte interview prep

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

Practise them as a timed round6 roles open at Deloitte

DSA 1

  1. DSAEasy

    Euclid's algorithm replaces (a, b) with (b, a mod b) until b is 0. Starting from (252, 105), how many steps does it take, and what is the HCF?

    1. 2 steps; HCF 7
    2. 3 steps; HCF 21
    3. 3 steps; HCF 7
    4. 4 steps; HCF 21
    Show the answer

    B. 3 steps; HCF 21

    (252, 105) -> (105, 42) -> (42, 21) -> (21, 0): three steps, and the HCF is 21. The values at least halve every two steps, so it runs in O(log min(a, b)).

    This topic is named in a candidate’s interview report: Business technology analyst interview, 2021, on GeeksforGeeks.

C and C++ 1

  1. C and C++Medium

    What does this print?

    #include <iostream>
    
    struct A {
        A()  { std::cout << "A"; }
        ~A() { std::cout << "a"; }
    };
    struct B : A {
        B()  { std::cout << "B"; }
        ~B() { std::cout << "b"; }
    };
    
    int main() {
        B obj;
    }
    1. ABab
    2. BAba
    3. ABba
    4. BAab
    Show the answer

    C. ABba

    The base part is built first, so A then B. Destruction runs in reverse: B's destructor, then A's, when obj goes out of scope.

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

DBMS and SQL 1

  1. DBMS and SQLEasy

    Which query finds customers whose name starts with "Ra"?

    1. SELECT * FROM customer WHERE name = 'Ra*';
    2. SELECT * FROM customer WHERE name LIKE 'Ra%';
    3. SELECT * FROM customer WHERE name LIKE '%Ra';
    4. SELECT * FROM customer WHERE name LIKE 'Ra_';
    Show the answer

    B. SELECT * FROM customer WHERE name LIKE 'Ra%';

    In LIKE, % matches any run of characters, including none, and _ matches exactly one. '%Ra' would find names ending in Ra, and 'Ra_' only three-letter names.

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

Prep for other employers

All employers
See who is hiring after Deloitte

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