Electronic Arts Coding Interview Questions
25 Electronic Arts coding interview problems with full optimal solutions — 15 easy, 7 medium, 3 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Electronic Arts interviewer values, and a FAQ section.
- #1easyfoundational
1. Two Sum
Find two indices in an array whose values sum to a target — a classic warm-up at EA gauging hash-map fluency.
- #2easyfoundational
2. Valid Parentheses
Validate that bracket characters in a string are properly matched and nested using stack-based parsing.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted list using pointer manipulation.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
In-place dedup of a sorted array using two pointers — a classic systems-style array problem.
- #5easyfoundational
5. Remove Element
Remove all occurrences of a target value in place, returning the new logical length.
- #6easyfoundational
6. Search Insert Position
Binary-search for a target or the index where it would be inserted to keep the array sorted.
- #7easyfoundational
7. Plus One
Increment an arbitrary-precision integer represented as a digit array.
- #8easyfoundational
8. Merge Sorted Array
Merge nums2 into nums1 in place, exploiting trailing zero slots and walking from the back.
- #9easyfoundational
9. Binary Tree Inorder Traversal
Return the inorder traversal of a binary tree's node values using recursion or an explicit stack.
- #10easyfoundational
10. Same Tree
Determine whether two binary trees are structurally and value-wise identical.
- #11easyfoundational
11. Symmetric Tree
Determine whether a binary tree is a mirror of itself around its center.
- #12easyfoundational
12. Maximum Depth of Binary Tree
Return the number of nodes on the longest root-to-leaf path.
- #13easyfoundational
13. Path Sum
Determine if a binary tree has a root-to-leaf path that sums to a target value, a pattern used in EA game scene-graph traversals.
- #14easyfoundational
14. Pascal's Triangle
Generate the first numRows rows of Pascal's triangle, testing 2D array construction skills valued in EA's simulation and math-heavy game code.
- #15easyfoundational
15. Single Number
Find the element that appears only once in an array where every other element appears twice, testing bit manipulation knowledge used in EA's low-level engine code.
- #16mediumfoundational
16. Number of Islands
Count connected land regions in a 2D grid using BFS/DFS, a core EA interview topic tied directly to game-map analysis and connected-component detection.
- #17mediumfoundational
17. Course Schedule
Detect a cycle in a directed graph of course prerequisites, a pattern EA applies to dependency graphs in asset loading and game-state initialization systems.
- #18mediumfoundational
18. Implement Trie (Prefix Tree)
Build a trie supporting insert, search, and startsWith operations, a data structure EA uses in autocomplete for in-game chat and matchmaking search.
- #19mediumfoundational
19. Product of Array Except Self
Compute for each position the product of all other elements without division, a prefix/suffix technique EA applies in simulation stat calculations and damage multiplier systems.
- #20mediumfoundational
20. Find the Duplicate Number
Find a repeated number in an array using Floyd's cycle detection, demonstrating the pointer-manipulation skills EA values for memory-constrained game engine problems.
- #21mediumfoundational
21. Word Search
Search for a word in a 2D character grid using backtracking DFS, a direct analog to EA's tile-map traversal and game-world pathfinding interview problems.
- #22mediumfoundational
22. Minimum Path Sum
Find the minimum cost path from top-left to bottom-right of a grid using DP, mirroring EA's movement cost and terrain-weight calculations in strategy game pathfinding.
- #23hardfoundational
23. Trapping Rain Water
Calculate how much water can be trapped between bars of varying heights, a spatial simulation problem EA asks to test terrain modeling and two-pointer mastery.
- #24hardfoundational
24. Largest Rectangle in Histogram
Find the largest rectangular area in a histogram using a monotonic stack, testing advanced stack-based spatial reasoning that EA applies in collision-box and physics simulations.
- #25hardfoundational
25. Sliding Window Maximum
Return the maximum of each sliding window of size k in O(n) using a monotonic deque, a technique EA uses for real-time game stat tracking and replay analysis windows.