InterviewStack.io LogoInterviewStack.io

Arrays Strings and Collections Fundamentals Questions

Core knowledge of linear data structures and common collection types and the techniques used to manipulate them. Covers arrays and strings operations such as iteration, indexing, in place modification, reversing, rotating, two pointer techniques, sliding window patterns, searching and basic sorting approaches for these containers, and typical interview problems like finding duplicates and subarray or substring problems. Also covers collection types such as lists, sets, dictionaries and hash tables, when to use each, loop constructs and recursion for traversal, and basic time and space complexity reasoning to choose appropriate data structures and algorithms.

EasyTechnical
36 practiced
For data pipelines, when would you choose a Python list, a NumPy array, or a pandas Series to store a single column of numerical data? Discuss memory layout, vectorized operations, mutability, interoperability, and typical operations in feature engineering.
HardTechnical
42 practiced
Implement find_median_sorted_arrays(A, B) in Python that returns the median of two sorted arrays in O(log(min(m, n))) time. Explain partitioning strategy, edge cases when partitions are empty, and how to handle even total length.
EasyTechnical
41 practiced
Write a Python function remove_duplicates_preserve_order(items) that removes duplicate elements but preserves the original order. The input can be large; discuss a solution that uses O(n) time and O(n) extra memory, and describe how to modify it to use less memory if element hashing is expensive.
MediumTechnical
44 practiced
Given an array of integers where values are in [1, n] and there is exactly one duplicate, implement a method to find the duplicate without modifying the array and using O(1) extra space. Explain how Floyd's Tortoise and Hare cycle detection maps to this problem.
MediumTechnical
35 practiced
Implement an LRUCache class in Python with methods get(key) and put(key, value) that run in O(1) time. Use only built-in data structures or explain how to implement from first principles. Discuss use-cases in feature stores or caching precomputed vectors.

Unlock Full Question Bank

Get access to hundreds of Arrays Strings and Collections Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.