Pattern · Array

Array interview questions

1088 array problems tagged across recent interview reports. Drilled most heavily by google, amazon, and meta.

Founder's read

Array problems are the foundation of technical interviews. With 1088 problems tagged across this pattern, you'll see arrays in every round at Google, Amazon, Meta, and Microsoft. Array problems range from basic traversal and manipulation to complex multi-pointer techniques and sliding windows. The pattern is deceptively simple: you're given one or more sequences of elements, and you need to find, transform, or rearrange data efficiently. Most candidates drill arrays casually and hit a wall when a hard variant lands in their live OA. StealthCoder solves it in seconds, invisible to the proctor.

Most-asked array problems

#ProblemDiff# Companies
01Best Time to Buy and Sell StockEASY120
023SumMEDIUM66
03Best Time to Buy and Sell Stock IIMEDIUM34
04Asteroid CollisionMEDIUM24
054SumMEDIUM21
06Alien DictionaryHARD13
073Sum ClosestMEDIUM12
08Best Time to Buy and Sell Stock IIIHARD12
09Best Time to Buy and Sell Stock IVHARD9
10Accounts MergeMEDIUM8
11Beautiful ArrangementMEDIUM6
1201 MatrixMEDIUM5
13Analyze User Website Visit PatternMEDIUM4
14Best Meeting PointHARD4
15Best Time to Buy and Sell Stock with CooldownMEDIUM4
1624 GameHARD3
17Add to Array-Form of IntegerEASY3
18Assign CookiesEASY3
191-bit and 2-bit CharactersEASY2
20132 PatternMEDIUM2
213Sum SmallerMEDIUM2
22Add Bold Tag in StringMEDIUM2
23Alert Using Same Key-Card Three or More Times in a One Hour PeriodMEDIUM2
24Apply Operations to Maximize Frequency ScoreHARD2
25Arithmetic Slices II - SubsequenceHARD2
26As Far from Land as PossibleMEDIUM2
27Average Value of Even Numbers That Are Divisible by ThreeEASY2
28Average Waiting TimeMEDIUM2
29Battleships in a BoardMEDIUM2
303Sum With MultiplicityMEDIUM1
31Adding Two Negabinary NumbersMEDIUM1
32Advantage ShuffleMEDIUM1
33Alternating Groups IEASY1
34Alternating Groups IIMEDIUM1
35Ant on the BoundaryEASY1
36Apply Operations on Array to Maximize Sum of SquaresHARD1
37Apply Operations to Make String EmptyMEDIUM1
38Apply SubstitutionsMEDIUM1
39Arithmetic SlicesMEDIUM1
40Array TransformationEASY1
41Available Captures for RookEASY1
42Average Salary Excluding the Minimum and Maximum SalaryEASY1
43Avoid Flood in The CityMEDIUM1
44Bag of TokensMEDIUM1
45Baseball GameEASY1
46Beautiful Towers IMEDIUM1
47Beautiful Towers IIMEDIUM1
48Best Position for a Service CentreHARD1
49Best Sightseeing PairMEDIUM1
50Best Team With No ConflictsMEDIUM1

Showing top 50 of 1088 array problems by # companies asking.

The hedge for the live OA

You can't drill every array variant before the assessment. StealthCoder runs invisibly during screen share and solves whichever variant they throw at you. No browser extension. No detection signature. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.

Get StealthCoder
What this means

Array problems split into recognizable subtypes: index-based lookups (fast search, two-pointer), element rearrangement (in-place partitioning, rotation), aggregate operations (sum, product, XOR), and multi-array coordination (merge, intersection). A 3Sum variant or 132-Pattern problem looks deceptively familiar until you hit an edge case or a non-obvious optimization. Google and Amazon weight arrays heavily (260 and 256 problems respectively), and they test your ability to optimize from O(n²) brute force to O(n log n) or O(n). Drill in order: two-pointer basics, sliding window, then prefix/suffix tricks. When you're 10 minutes into a live assessment and realize the greedy approach won't work, StealthCoder is your hedge for the array variant you didn't see coming.

Companies that hire most on array

The honest play

1088 array problems. You won't drill them all. Pass anyway.

Array is one of the patterns interviews actually filter on. Memorizing every variant in a week is a fantasy. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds, no matter which array flavor lands in your live OA. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Array interview FAQ

How many array problems should I drill before interviews?+

Most candidates spend 40-60 problems before they see the common patterns clearly. Focus on two-pointer, sliding window, and prefix sum first. With 1088 tagged problems, drilling 50-80 core patterns covers 80% of what lands in live OAs. Quality over quantity: understand why each solution works.

Which companies test arrays the hardest?+

Google (260 problems) and Amazon (256 problems) are the heaviest. Meta, Microsoft, and Bloomberg all sit above 220. If you're interviewing at any of these, expect at least one array problem per round. Hard variants like 132-Pattern or 24-Game show up consistently.

How do I recognize an array problem in a live assessment?+

You're given a sequence or multiple sequences. The ask is usually: find indices, compute a value, rearrange elements, or optimize space/time. If you see numbers in a list and the problem doesn't explicitly mention trees, graphs, or strings, it's likely an array problem. Read the constraints first: they hint at the expected complexity.

What's the difference between array and string problems?+

Strings are arrays of characters with special operations (substring matching, anagrams, palindromes). Core array techniques apply to both. If the problem emphasizes character manipulation or pattern matching within text, it's usually tagged as string. But the underlying skills are the same.

Should I memorize array solutions or understand the logic?+

Understand the logic. Memorizing solutions doesn't transfer when the problem tweaks constraints or input format. Drill the pattern logic: two-pointer movement, window expansion/contraction, prefix computation. That transferability is what gets you through a live OA when the exact problem you drilled doesn't show up.

Problem and frequency data sourced from public community-maintained interview-report repos. Problems and trademarks © LeetCode.