Talentd
FleetCode
Make and follow sheets.Sign in

Array Problems (2,237)

Problems tagged with Array. Start with the easy ones, then move to medium and hard.

447 Easy1,212 Medium578 Hard

Learn these first

1
Hash Table

Hash tables are frequently combined with arrays to track frequencies, complements, or previously seen values. This approach turns many O(n^2) array problems into O(n) solutions.

2
Prefix Sum

Prefix sums allow constant-time range queries on arrays. This technique is essential for solving subarray sum problems, cumulative counts, and optimization questions.

3
Two Pointers

Many array interview problems use the two-pointer technique to scan from both ends or maintain two moving indices. Learning this pattern helps optimize problems like pair sums, partitioning, and sorted array processing.

4
Binary Search

Binary search is commonly applied to sorted arrays. Understanding this technique helps solve search, boundary, and optimization problems with logarithmic time complexity.

5
Sliding Window

Sliding window builds directly on arrays and helps solve subarray and substring problems efficiently. It reduces nested loops to linear time by maintaining a dynamic window over the array.

TitleSolutionAcceptDifficultyTopics
Solution67.3%Medium
Array, Bucket Sort +6· 53 companies
348. Design Tic-Tac-ToeVideoPremium
Solution58.8%Medium
Array, Design +3· 13 companies
Solution78.2%Easy
Array, Binary Search +3· 16 companies
Solution60.4%Easy
Array, Binary Search +3· 9 companies
353. Design Snake GameVideoPremium
Solution40.0%Medium
Array, Design +3· 10 companies
Solution37.8%Hard
Array, Binary Search +2· 13 companies
356. Line ReflectionVideoPremium
Solution36.3%Medium
Array, Hash Table +1· 2 companies
360. Sort Transformed ArrayVideoPremium
Solution58.0%Medium
Array, Math +2· 3 companies
361. Bomb EnemyVideoPremium
Solution52.8%Medium
Array, Dynamic Programming +1· 2 companies
362. Design Hit CounterVideoPremium
Solution69.6%Medium
Array, Binary Search +3· 25 companies
Solution50.1%Medium
Array, Dynamic Programming +2· 6 companies
370. Range AdditionVideoPremium
Solution73.0%Medium
Array, Prefix Sum· 2 companies
Solution49.9%Medium
Array, Dynamic Programming +1· 1 company
Solution55.0%Medium
Array, Dynamic Programming· 7 companies
379. Design Phone DirectoryVideoPremium
Solution53.3%Medium
Array, Design +3· 1 company
Solution55.3%Medium
Array, Design +3· 38 companies
Solution59.6%Medium
Array, Design +2· 8 companies
Solution39.4%Hard
Array, Line Sweep· 3 companies
Solution46.7%Medium
Array, Bit Manipulation· 4 companies
396. Rotate FunctionVideo
Solution54.0%Medium
Array, Dynamic Programming +1· 6 companies
Solution64.7%Medium
Array, Breadth-First Search +5· 23 companies
403. Frog JumpVideo
Solution47.8%Hard
Array, Dynamic Programming· 11 companies
Solution64.0%Hard
Array, Breadth-First Search +2· 14 companies
Solution61.2%Hard
Array, Binary Search +3· 20 companies
–40.5%Hard
Array, Backtracking +2· 2 companies
Solution65.0%Medium
Array, Dynamic Programming +1· 7 companies
Solution40.3%Easy
Array, Sorting· 9 companies
Solution61.3%Medium
Array, Breadth-First Search +2· 11 companies
418. Sentence Screen FittingVideoPremium
Solution36.3%Medium
Array, Dynamic Programming +1· 1 company
Solution77.4%Medium
Array, Depth-First Search +1· 8 companies
422. Valid Word SquareVideoPremium
Solution42.9%Easy
Array, Matrix· 1 company
425. Word SquaresVideoPremium
Solution54.7%Hard
Array, Backtracking +2· 1 company
Solution78.8%Medium
Array, Divide and Conquer +2· 8 companies
Solution57.5%Medium
Array, Dynamic Programming +2· 18 companies
Solution56.7%Medium
Array, Binary Search +1· 4 companies
Solution76.8%Medium
Array, Hash Table· 11 companies
444. Sequence ReconstructionVideoPremium
Solution31.2%Medium
Array, Graph +1· 2 companies
Solution58.0%Medium
Array, Hash Table +1· 2 companies
Solution59.2%Medium
Array, Math· 8 companies
454. 4Sum IIVideo
Solution57.9%Medium
Array, Hash Table· 4 companies
Showing 151–200 of 2,209

More about Array

An Array is one of the most fundamental data structures in computer science. It stores a collection of elements in contiguous memory locations and allows constant-time access using an index. Because of its simplicity and efficiency, arrays are often the first data structure taught in Data Structures and Algorithms (DSA) and serve as the foundation for solving a huge variety of algorithmic problems.

In coding interviews, array questions are extremely common. Companies like Google, Amazon, Meta, and Microsoft frequently test candidates on array manipulation because these problems reveal how well you understand time complexity, memory usage, and algorithmic thinking. Mastering array techniques helps you solve a wide range of interview questions efficiently and often forms the base for more advanced topics.

Array problems typically revolve around recognizing patterns and applying the right technique. Some of the most common approaches include:

  • Using the two pointer technique to process elements from both ends efficiently (see Two Pointers).
  • Optimizing subarray calculations with Prefix Sum.
  • Maintaining dynamic ranges of elements with Sliding Window.
  • Speeding up lookups using Hash Table techniques.
  • Applying Binary Search on sorted arrays to reduce time complexity from O(n) to O(log n).

You should reach for arrays whenever you need fast indexed access, efficient iteration, or when working with sequences of data such as numbers, characters, or objects. Many advanced problems across dynamic programming, greedy algorithms, and graph preprocessing also rely on arrays as their underlying storage.

FleetCode provides ranging from beginner-friendly exercises to advanced interview-level challenges. By practicing these questions and learning the common patterns, you will build the intuition needed to quickly identify optimal solutions during real coding interviews.

Array: common questions

Are Array and Matrix problems related?

Yes. A matrix is essentially a 2D array, meaning many array techniques still apply. Traversal patterns, prefix sums, and sliding window concepts often extend naturally to matrix-based problems.

What is the best way to learn Array in DSA?

Start by understanding basic operations such as traversal, insertion, and deletion. Then practice pattern-based problems like two pointers, prefix sums, and sliding windows.

Is Array an important topic for FAANG interviews?

Yes, arrays are one of the most frequently tested topics in FAANG-style coding interviews. Many problems involving strings, matrices, and sliding windows are fundamentally array problems. Strong array skills often translate into faster solutions for other algorithm categories.

What are common Array patterns in coding interviews?

The most common array patterns include two pointers, sliding window, prefix sum, hashing with arrays, and binary search on sorted arrays. Recognizing which pattern applies to a problem often reduces complexity from O(n^2) to O(n) or O(log n).

How many Array problems should I solve for interviews?

The key is learning patterns rather than memorizing solutions.

What are the best Array problems for coding interviews?

The best array interview problems focus on core patterns such as two pointers, sliding window, prefix sum, and hashing. Classic examples include Two Sum, Maximum Subarray, Product of Array Except Self, and Subarray Sum Equals K.