InterviewStack.io LogoInterviewStack.io

Linked Lists Stacks and Queues Questions

Covers core singly and doubly linked list concepts and the fundamental abstract data types stack and queue. For linked lists this includes node structure, traversal, insertion at head and tail, deletion, reversal, finding middle, merging, detecting cycles, removing duplicates, intersection detection, and pointer manipulation details for languages with manual memory management. For stacks and queues this includes LIFO and FIFO semantics, push, pop, peek, enqueue, dequeue, circular buffer implementations, and implementing one with the other (for example queue with two stacks). Also includes array versus linked list implementations, complexity analysis for time and space, and common algorithmic patterns that use these structures (for example bracket matching, reverse polish notation evaluation, depth first search using a stack, breadth first search using a queue, sliding window and monotonic queue techniques). Interviewers assess correct implementation, edge case handling, performance tradeoffs, and ability to choose the appropriate structure or approach for a problem.

EasyTechnical
0 practiced
Provide a comparative table and explanation of time and space complexity for these data structures: dynamic array (array list), singly linked list, doubly linked list, stack, and queue. Cover operations: random access by index, insert at head, insert at tail, delete at head, delete at tail, search, memory overhead per element, and cache locality implications.
HardSystem Design
0 practiced
Design a concurrent, high-throughput LRU cache suitable for a multithreaded server. Describe how you would implement the cache core using a hash map and a doubly linked list, and then explain techniques to make it concurrent and scalable (lock striping, sharding, or optimistic concurrency). Discuss eviction policy, approximate LRU alternatives, and memory and performance tradeoffs.
MediumTechnical
0 practiced
Write a function that merges two sorted singly linked lists into a single sorted list in-place without allocating new nodes. Provide code (Python or Java), discuss iterative vs recursive approaches, and analyze time and space complexity. Mention how you would merge k sorted lists efficiently.
MediumTechnical
0 practiced
Implement iterative depth-first search for a graph using an explicit stack (no recursion). Show code for visiting nodes in DFS order given an adjacency list and discuss differences in stack-driven DFS vs recursive DFS in terms of space, tail recursion, and control over traversal order.
EasyTechnical
0 practiced
Implement a Stack using a singly linked list in JavaScript. Provide methods push(value), pop(), peek(), isEmpty(), and size(). Ensure all operations are O(1), handle underflow properly, and include short usage examples.

Unlock Full Question Bank

Get access to hundreds of Linked Lists Stacks and Queues interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.