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.

HardTechnical
33 practiced
Given an array of integers, count the number of continuous subarrays whose sum equals k. Implement an O(n) solution using prefix sums and a hash map. Then discuss why sliding window fails when negatives exist, and how to optimize for non-negative arrays.
HardSystem Design
31 practiced
Design a service to store and serve very large arrays/time-series per user with efficient range-sum and point-update queries. Include API design, choice of storage (in-memory vs on-disk), indexing, sharding strategy, caching, and how segment trees or B-trees could be used at scale.
EasyTechnical
32 practiced
Write a function that removes all vowels from an input string (English vowels a,e,i,o,u) and returns the new string. Example: input 'leetcode' -> output 'ltcd'. Implement in your language and mention complexity assumptions for very long input strings.
MediumTechnical
36 practiced
Find the length of the longest increasing subsequence (LIS) in an integer array using an O(n log n) algorithm (patience sorting / tails array). Example: [10,9,2,5,3,7,101,18] -> 4. Implement and explain the binary-search step.
HardTechnical
54 practiced
Implement an algorithm to find the intersection node (by reference) of two singly linked lists without extra memory. Then generalize to the case where lists may contain cycles: detect intersections considering cycle entry points and cover all edge cases.

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.