InternDoor

BNP Paribas interview prep

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

Practise them as a timed round8 roles open at BNP Paribas

DSA 3

  1. DSAEasy

    Prices over six days are [7, 1, 5, 3, 6, 4]. Buying once and selling once later, what is the best profit?

    1. 5
    2. 6
    3. 4
    4. 0
    Show the answer

    A. 5

    Buy at 1, sell at 6. One pass keeps the lowest price so far and the best price minus that low, O(n). Selling at 7 is impossible because 7 comes before 1.

    This topic is named in a candidate’s interview report: Software engineer intern on-campus interview, 2024, on Code360.

  2. DSAHard

    What is the largest product of a contiguous subarray of [2, -5, -2, -4, 3]?

    1. 20
    2. 30
    3. 24
    4. 240
    Show the answer

    C. 24

    [-2, -4, 3] gives 24, and [2, -5, -2] gives 20. Keep both the largest and the smallest product ending at each index, because a negative number turns the smallest into the largest; swap them when the current number is negative.

    This topic is named in a candidate’s interview report: Software engineer intern on-campus interview, 2024, on Code360.

  3. DSAMedium

    Intervals [1, 3], [2, 4], [6, 7], [9, 12] and [11, 13]. Which overlap no other interval (sharing an end point counts as overlapping)?

    1. [6, 7] only
    2. [1, 3] and [6, 7]
    3. [6, 7] and [9, 12]
    4. None of them
    Show the answer

    A. [6, 7] only

    Sort by start; an interval is isolated when it starts after the largest end seen so far and ends before the next interval starts. [1, 3] and [2, 4] overlap, as do [9, 12] and [11, 13]. Sorting makes it O(n log n).

    This topic is named in a candidate’s interview report: Software engineer intern on-campus interview, 2024, on Code360.

Java 1

  1. JavaEasy

    In System.out.println("hi"), what are System, out and println?

    1. A package, a class and a keyword
    2. System is a class in java.lang, out is its public static field of type PrintStream, and println is a method of PrintStream
    3. System is an object, out a method and println a field
    4. Three keywords of the language
    Show the answer

    B. System is a class in java.lang, out is its public static field of type PrintStream, and println is a method of PrintStream

    out is a static field, so it is reached through the class name with no System object. It is a PrintStream wired to standard output; System.err is another PrintStream for errors, and System.setOut can replace out.

    This topic is named in a candidate’s interview report: Java developer intern interview, Chennai, 2019, on GeeksforGeeks.

DBMS and SQL 1

  1. DBMS and SQLEasy

    customer has the names Balaji, Abhay, Shobana and Saba. With a case-sensitive comparison, which names does this return?

    SELECT name FROM customer WHERE name LIKE '%ba%';
    1. Balaji, Shobana and Saba
    2. Saba only
    3. Shobana and Saba
    4. Abhay, Shobana and Saba
    Show the answer

    C. Shobana and Saba

    % matches any run of characters, including none, so the pattern means "ba" anywhere in the name. Shobana and Saba contain lower-case "ba". Balaji starts with "Ba", which a case-sensitive comparison does not match, and Abhay has "bh", not "ba". MySQL's default collations are case-insensitive and would add Balaji.

    This topic is named in a candidate’s interview report: Java developer intern interview, Chennai, 2019, on GeeksforGeeks.

Prep for other employers

All employers
See who is hiring after BNP Paribas

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