Interview Q&A / Data Structures & Algorithms
Data Structures & Algorithms interview questions
Arrays, linked lists, hashing, trees and patterns, with line-by-line code and complexity.
Prefer rapid revision? Practise Data Structures & Algorithms short interview answers →
- What happens if a recursive function has no base case?
It keeps calling itself, each call adds a frame to the call stack, and eventually the stack runs out of space. JavaScript throws a RangeError: Maximum call stack size exceeded.
BeginnerQuick answer1 min read