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
502. IPOVideo
Solution53.6%Hard
Array, Greedy +2· 9 companies
Solution45.9%Hard
Array, Greedy· 2 companies
527. Word AbbreviationVideoPremium
Solution62.7%Hard
Array, Greedy +3· 4 companies
546. Remove BoxesVideo
Solution50.0%Hard
Array, Dynamic Programming +1· 12 companies
Solution50.1%Hard
Array, Hash Table +1· 1 company
568. Maximum Vacation DaysVideoPremium
Solution46.7%Hard
Array, Dynamic Programming +1· 3 companies
587. Erect the FenceVideo
Solution53.4%Hard
Array, Geometry +1· 3 companies
Solution42.1%Hard
Array, Greedy +2· 4 companies
631. Design Excel Sum FormulaVideoPremium
–39.3%Hard
Array, Design +3· 9 companies
Solution37.7%Hard
Array, Binary Search +1· 1 company
656. Coin PathVideoPremium
Solution34.2%Hard
679. 24 GameVideo
Solution59.4%Hard
Array, Backtracking +1· 7 companies
683. K Empty SlotsVideoPremium
Solution38.0%Hard
Array, Binary Indexed Tree +6· 1 company
Solution51.3%Hard
Array, Backtracking +4· 4 companies
699. Falling SquaresVideo
Solution48.9%Hard
Array, Ordered Set +1· 2 companies
Solution35.4%Hard
Array, Binary Search +4· 3 companies
741. Cherry PickupVideo
Solution40.4%Hard
Array, Dynamic Programming +1· 10 companies
Solution41.2%Hard
Array, Design +3· 3 companies
749. Contain VirusVideo
Solution56.5%Hard
Array, Breadth-First Search +3· 3 companies
Solution58.0%Hard
Array, Greedy +1· 6 companies
759. Employee Free TimeVideoPremium
Solution72.9%Hard
Array, Heap (Priority Queue) +1· 12 companies
Solution54.7%Hard
Array, Greedy +3· 5 companies
773. Sliding PuzzleVideo
Solution74.3%Hard
Array, Backtracking +4· 7 companies
Solution53.9%Hard
Array, Binary Search· 2 companies
Solution68.3%Hard
Array, Binary Search +5· 8 companies
Solution51.9%Hard
Array, Bit Manipulation +2· 2 companies
Solution37.7%Hard
Array, Matrix +1· 3 companies
Solution67.3%Hard
Array, Bit Manipulation +3· 3 companies
815. Bus RoutesVideo
Solution47.3%Hard
Array, Breadth-First Search +1· 18 companies
Solution57.0%Hard
Array, Breadth-First Search +3· 16 companies
Solution56.7%Hard
Array, Breadth-First Search +4· 5 companies
843. Guess the WordVideo
Solution36.9%Hard
Array, Game Theory +3· 10 companies
Solution56.7%Hard
Array, Line Sweep +2· 2 companies
Solution63.5%Hard
Array, Greedy +2· 3 companies
Solution48.7%Hard
Array, Dynamic Programming· 2 companies
Solution43.6%Hard
Array, Breadth-First Search +4· 10 companies
Solution41.9%Hard
Array, Math· 2 companies
Showing 51–100 of 566

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.