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.

EasyTechnical
0 practiced
Given a list of strings in Python, implement a function that returns a dictionary mapping each unique string to its frequency count. The function should be memory- and time-efficient for moderate lists (millions of items). Show code and explain complexity. Example input: ['a','b','a','c','b','a'] -> {'a':3, 'b':2, 'c':1}.
MediumTechnical
0 practiced
Given an array of integers, implement a function to find a contiguous subarray that sums to a target value (return start and end indices or None). Input may contain negative numbers. Aim for O(n) time using core data structures (lists and dicts) and explain the algorithm.
MediumTechnical
0 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.
EasyTechnical
0 practiced
Given a list with possible duplicate elements, implement a Python function that returns a new list with duplicates removed while preserving the original order. Explain your choice of data structures and complexity. Example: [3,1,2,3,2] -> [3,1,2].
HardTechnical
0 practiced
Implement a CSV parser in Python that correctly handles quoted fields, escaped quotes, and large files by streaming. Do not use Python's csv module; instead implement a state machine that yields parsed rows one at a time. Explain states and how you handle chunked input.

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.