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
Solution58.8%Easy
Array, Hash Table· 12 companies
704. Binary SearchVideo
Solution61.2%Easy
Array, Binary Search· 11 companies
705. Design HashSetVideo
Solution67.9%Easy
Array, Design +3· 6 companies
706. Design HashMapVideo
Solution66.5%Easy
Array, Design +3· 13 companies
Solution49.5%Easy
Array· 4 companies
Solution64.2%Easy
Array, Prefix Sum· 18 companies
733. Flood FillVideo
Solution68.6%Easy
Array, Breadth-First Search +2· 12 companies
734. Sentence SimilarityVideoPremium
Solution44.5%Easy
Array, Hash Table +1· 1 company
Solution63.5%Easy
Array, Hash Table +1· 1 company
760. Find Anagram MappingsVideoPremium
Solution83.8%Easy
Array, Hash Table· 1 company
766. Toeplitz MatrixVideo
Solution69.8%Easy
Array, Matrix· 4 companies
Solution83.6%Easy
Array, Hash Table +1· 3 companies
Solution72.9%Easy
Array, String· 2 companies
Solution72.1%Easy
Array, Geometry +1· 3 companies
Solution45.0%Easy
Array, Counting +2· 5 companies
Solution72.7%Easy
Array, String +1· 4 companies
Solution83.6%Easy
Array, Bit Manipulation +3· 6 companies
860. Lemonade ChangeVideo
Solution59.6%Easy
Array, Greedy· 8 companies
Solution77.4%Easy
Array, Matrix +1· 7 companies
Solution76.9%Easy
Array, Geometry +2· 1 company
888. Fair Candy SwapVideo
Solution65.9%Easy
Array, Binary Search +2· 6 companies
Solution71.2%Easy
Array, Geometry +2· 1 company
896. Monotonic ArrayVideo
Solution62.3%Easy
Array· 7 companies
Solution76.2%Easy
Array, Sorting +1· 8 companies
Solution74.0%Easy
Array, Math· 3 companies
Solution30.4%Easy
Array, Counting +3· 2 companies
Solution71.4%Easy
Array, Sorting +1· 6 companies
Solution67.9%Easy
Array, Hash Table +1· 5 companies
Solution35.7%Easy
Array· 7 companies
942. DI String MatchVideo
Solution81.0%Easy
Array, Greedy +2· 3 companies
Solution78.1%Easy
Array, String· 4 companies
Solution55.9%Easy
Array, Hash Table +1· 8 companies
Solution62.1%Easy
Array, Greedy +2· 5 companies
Solution73.7%Easy
Array, Sorting +1· 17 companies
Solution45.6%Easy
Array, Math· 4 companies
Solution51.2%Easy
Array, Graph +1· 7 companies
Solution72.2%Easy
Array, Matrix +1· 2 companies
Solution74.6%Easy
Array, Hash Table +1· 6 companies
Solution54.3%Easy
Array, Greedy +1· 4 companies
Solution74.6%Easy
Array, Geometry +3· 1 company
1037. Valid BoomerangVideo
Solution40.5%Easy
Array, Geometry +1· 2 companies
Solution66.4%Easy
1051. Height CheckerVideo
Solution81.6%Easy
Array, Counting Sort +1· 6 companies
1064. Fixed PointVideoPremium
Solution64.1%Easy
Array, Binary Search· 1 company
Showing 51–100 of 447

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.