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
247. Strobogrammatic Number IIVideoPremium
Solution53.5%Medium
Array, Recursion +1· 2 companies
249. Group Shifted StringsVideoPremium
Solution67.8%Medium
Array, Hash Table +1· 4 companies
251. Flatten 2D VectorVideoPremium
Solution50.5%Medium
Array, Design +2· 4 companies
252. Meeting RoomsVideoPremium
Solution59.4%Easy
Array, Sorting· 10 companies
253. Meeting Rooms IIVideoPremium
Solution52.6%Medium
Array, Greedy +4· 42 companies
256. Paint HouseVideoPremium
Solution64.3%Medium
Array, Dynamic Programming· 8 companies
259. 3Sum SmallerVideoPremium
Solution51.4%Medium
Array, Binary Search +2· 7 companies
Solution70.2%Medium
Array, Bit Manipulation· 7 companies
265. Paint House IIVideoPremium
Solution57.0%Hard
Array, Dynamic Programming· 2 companies
268. Missing NumberVideo
Solution72.4%Easy
Array, Binary Search +4· 19 companies
269. Alien DictionaryVideoPremium
Solution37.1%Hard
Array, Breadth-First Search +4· 18 companies
271. Encode and Decode StringsVideoPremium
Solution51.9%Medium
Array, Design +1· 11 companies
274. H-IndexVideo
Solution41.8%Medium
Array, Counting Sort +1· 8 companies
275. H-Index IIVideo
Solution40.0%Medium
Array, Binary Search· 1 company
280. Wiggle SortVideoPremium
Solution68.5%Medium
Array, Greedy +1· 4 companies
281. Zigzag IteratorVideoPremium
Solution67.1%Medium
Array, Design +2· 5 companies
283. Move ZeroesVideo
Solution64.3%Easy
Array, Two Pointers· 46 companies
Solution61.9%Medium
Array, Design +1· 3 companies
286. Walls and GatesVideoPremium
Solution63.9%Medium
Array, Breadth-First Search +1· 11 companies
Solution64.7%Medium
Array, Binary Search +2· 22 companies
288. Unique Word AbbreviationVideoPremium
Solution28.1%Medium
Array, Design +2· 1 company
289. Game of LifeVideo
Solution73.0%Medium
Array, Matrix +1· 15 companies
296. Best Meeting PointVideoPremium
Solution61.1%Hard
Array, Math +2· 9 companies
Solution59.8%Medium
Array, Binary Search +1· 30 companies
Solution73.5%Easy
Array, Design +1· 8 companies
Solution59.2%Medium
Array, Design +2· 10 companies
305. Number of Islands IIVideoPremium
Solution40.5%Hard
Array, Hash Table +1· 10 companies
Solution43.9%Medium
Array, Binary Indexed Tree +2· 4 companies
Solution46.0%Medium
Array, Binary Indexed Tree +3· 3 companies
Solution69.3%Medium
Array, Hash Table +1· 9 companies
312. Burst BalloonsVideo
Solution64.3%Hard
Array, Dynamic Programming· 15 companies
Solution46.6%Medium
Array, Dynamic Programming +1· 5 companies
Solution44.9%Hard
Array, Breadth-First Search +1· 15 companies
Solution61.7%Medium
Array, Bit Manipulation +1· 2 companies
Solution37.3%Hard
Array, Greedy +3· 7 companies
322. Coin ChangeVideo
Solution49.3%Medium
Array, Breadth-First Search +1· 40 companies
324. Wiggle Sort IIVideo
Solution38.4%Medium
Array, Divide and Conquer +3· 4 companies
Solution50.8%Medium
Array, Hash Table +1· 8 companies
Solution40.3%Hard
Array, Binary Indexed Tree +5· 5 companies
330. Patching ArrayVideo
Solution54.7%Hard
Array, Greedy· 4 companies
Solution39.3%Medium
Array, Greedy· 7 companies
335. Self CrossingVideo
Solution36.9%Hard
Array, Geometry +1· 1 company
Solution37.7%Hard
Array, Hash Table +2· 8 companies
Solution80.2%Easy
Array, Data Stream +2· 11 companies
Showing 101–150 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.