As reported: Walmart SDE-III round 1 (Bangalore, Apr 2026), a 60-minute DSA round with AI tools disabled: create a linked list with a method that inserts a node at the end. Working code passing all test cases was expected.
Implement your own linked list. The method asked in the round is insert at the end (addAtTail). The runner uses the full LeetCode version of the class:
get(index)— value of theindex-th node, or-1if the index is invalid.addAtHead(val),addAtTail(val).addAtIndex(index, val)— insert before theindex-th node;index == lengthappends; larger indexes do nothing.deleteAtIndex(index)— delete theindex-th node if the index is valid.
This is LeetCode 707 — Design Linked List.
Example
["MyLinkedList","addAtHead","addAtTail","addAtIndex","get","deleteAtIndex","get"]
[[],[1],[3],[1,2],[1],[1],[1]]
-> [null,null,null,null,2,null,3]
Constraints: 0 ≤ index, val ≤ 1000; at most 2000 calls.
Code runner format: two lines — the method names, then their arguments (LeetCode's format). Implement the MyLinkedList class; the harness prints the list of return values.