InternDoor

Walmart interview prep

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

Practise them as a timed round

DSA 1

  1. DSAEasy

    Print the matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]] in spiral order, starting at the top-left and moving right.

    1. 1 2 3 4 5 6 7 8 9
    2. 1 2 3 6 9 8 7 4 5
    3. 1 4 7 8 9 6 3 2 5
    4. 1 2 3 6 5 4 7 8 9
    Show the answer

    B. 1 2 3 6 9 8 7 4 5

    Go right along the top row, down the right column, left along the bottom row and up the left column, then repeat inside. Keep four bounds (top, bottom, left, right) and move one inward after each side.

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

DBMS and SQL 1

  1. DBMS and SQLMedium

    Table a has ids 1, 2 and 3. Table b has ids 2, 3 and 4. How many rows does this query return?

    SELECT a.id, b.id
    FROM a FULL OUTER JOIN b ON a.id = b.id;
    1. 2
    2. 4
    3. 3
    4. 6
    Show the answer

    B. 4

    Ids 2 and 3 match, giving two rows. Id 1 appears with NULL for b, and id 4 with NULL for a. An INNER JOIN would return 2 rows and a LEFT JOIN 3.

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

Computer networks 2

  1. Computer networksEasy

    At which OSI layer does IP routing happen?

    1. Data link (2)
    2. Network (3)
    3. Transport (4)
    4. Application (7)
    Show the answer

    B. Network (3)

    Routers read IP addresses and forward packets between networks at layer 3. Switches work at layer 2 with MAC addresses.

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

  2. Computer networksMedium

    A message reaches a phone. Which OSI layer gets it to the right app on that phone, rather than just to the phone?

    1. Network (3), using IP addresses
    2. Data link (2), using MAC addresses
    3. Transport (4), using port numbers
    4. Physical (1), using signals
    Show the answer

    C. Transport (4), using port numbers

    IP addresses at layer 3 get packets to the right device. Port numbers in TCP or UDP at layer 4 hand them to the right program on it. MAC addresses at layer 2 only carry a frame across one link, such as phone to Wi-Fi router.

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

Web development 1

  1. Web developmentMedium

    What does this JavaScript print?

    var fns = [];
    for (let i = 0; i < 3; i++) fns.push(() => i);
    var g = [];
    for (var j = 0; j < 3; j++) g.push(() => j);
    console.log(fns.map((f) => f()).join(""), g.map((f) => f()).join(""));
    1. 012 012
    2. 333 333
    3. 012 333
    4. 333 012
    Show the answer

    C. 012 333

    let is block-scoped, so each loop iteration gets its own i and each arrow remembers 0, 1 and 2. var is function-scoped: all three arrows share one j, which is 3 after the loop.

    This topic is named in a candidate’s interview report: Entry-level SDE interview, 2024, on Reddit.

Aptitude 1

  1. AptitudeEasy

    How many positive factors does 36 have?

    1. 9
    2. 8
    3. 6
    4. 12
    Show the answer

    A. 9

    36 = 2 x 2 x 3 x 3, so it has (2 + 1) x (2 + 1) = 9 factors: 1, 2, 3, 4, 6, 9, 12, 18 and 36. Only perfect squares have an odd number of factors, because the square root pairs with itself.

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

Prep for other employers

All employers
See who is hiring after Walmart

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