InterviewStack.io LogoInterviewStack.io

Core Data Structures Questions

Fundamental built in data structures used in everyday programming and coding interviews, focusing on lists, strings, and dictionaries. For lists cover indexing, slicing, iteration, common mutation operations such as append and extend, common algorithms such as sorting and reversing, and memory and performance implications. For strings cover indexing, slicing, common methods such as split, join, strip, replace, and approaches to string manipulation and pattern processing. For dictionaries cover key value semantics, insertion and lookup, iteration patterns, methods for safe access, and using dictionaries as hash tables for counting and grouping. Candidates should also know the time complexity of common operations expressed in plain terms such as constant time, linear time, and quadratic time, and be able to choose the appropriate structure for a problem and reason about space and performance tradeoffs. Practice often includes implementation level manipulations, common interview problems such as two sum and frequency counting, and writing clear code using these structures.

HardTechnical
81 practiced
Design a memory-efficient strategy to compute top-k most frequent items in a high-volume streaming dataset using only core data structures and small amount of memory. Explain the Misra-Gries (frequent algorithm) approach and how it uses dictionaries to track candidate heavy hitters.
EasyTechnical
64 practiced
Write a Python function that checks whether two strings are anagrams of each other. Provide at least two different approaches (one using sorting, one using counting via dictionary) and discuss the trade-offs in time and space for each.
EasyTechnical
49 practiced
Explain common iteration patterns over dictionaries in Python (keys(), values(), items()) and when each is appropriate. Discuss the memory implications of list(dict.items()) vs iterating directly and how that matters when processing large datasets.
MediumTechnical
62 practiced
Group anagrams: given a list of strings, return a list of groups where each group contains anagrams. Implement in Python and discuss different ways to build the grouping key (sorted string vs character count) and their trade-offs for very long strings.
MediumTechnical
53 practiced
Implement the sliding-window algorithm in Python to find the length of the longest substring without repeating characters. Provide code that runs in O(n) time and explain how you maintain the window and what structure stores character positions.

Unlock Full Question Bank

Get access to hundreds of Core Data Structures interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.