American Express On-Campus OA Experience (2026) | Summer Internship

american express logo
american express
· Summer Internship
August 13, 2026 · 0 reads

Summary

I appeared for the American Express on‑campus OA for a Summer Internship; the coding round consisted of three implementation‑heavy questions, two of which I describe below.

Full Experience

Appeared for the American Express on-campus OA on 13th August 2026 for the Summer Internship role. The coding round had 3 questions, and it was quite implementation-heavy overall. I don't remember the 3rd question well.

Question 1

Given an array A of n integers (both positive and negative), choose two contiguous fragments — one of size K and one of size L. The two fragments may overlap. Each element contributes to the final sum only once: if it lies in only one of the two fragments, it's added with its original sign; if it lies in both fragments, it's added with its sign flipped (negated). Find the maximum possible sum.

Function signature: int solution(vector &A, int K, int L)

Example: A = [1, 3, -4, 2, -2], K = 3, L = 2 Fragments: [1, 3, -4] (indices 0-2) and [-4, 2] (indices 2-3) Index 2 (-4) is shared → contributes as +4 Result: 1 + 3 + 4 + 2 = 10

Closest LeetCode: 1031 (Maximum Sum of Two Non-Overlapping Subarrays) — but this variant allows overlap with a sign‑flip twist, so it's a harder version.

Question 2

Given an N x M boolean grid representing a map, where A[R][C] = true means a solar power plant can be built on that cell, and false means it cannot. Place two square‑shaped power plants such that:

Both squares are the same size Every cell inside each square is true The two squares do not share any cell (no overlap) A single cell (1×1) counts as a valid square

Find the maximum possible side length of the two equal squares. Constraints: N, M ≤ 700.

Closest LeetCode: 221 (Maximal Square) — but this only covers the base DP.

Interview Questions (2)

1.

Maximum Sum with Overlapping Subarrays and Sign Flip

Data Structures & Algorithms·Hard

Given an array A of n integers (both positive and negative), choose two contiguous fragments — one of size K and one of size L. The two fragments may overlap. Each element contributes to the final sum only once: if it lies in only one of the two fragments, it's added with its original sign; if it lies in both fragments, it's added with its sign flipped (negated). Find the maximum possible sum.

Function signature: int solution(vector &A, int K, int L)

Example: A = [1, 3, -4, 2, -2], K = 3, L = 2 Fragments: [1, 3, -4] (indices 0-2) and [-4, 2] (indices 2-3) Index 2 (-4) is shared → contributes as +4 Result: 1 + 3 + 4 + 2 = 10

Closest LeetCode: 1031 (Maximum Sum of Two Non-Overlapping Subarrays) — but this variant allows overlap with a sign‑flip twist.

2.

Maximum Side Length of Two Equal Non‑Overlapping Squares in Boolean Grid

Data Structures & Algorithms

Given an N x M boolean grid representing a map, where A[R][C] = true means a solar power plant can be built on that cell, and false means it cannot. Place two square‑shaped power plants such that:

  • Both squares are the same size
  • Every cell inside each square is true
  • The two squares do not share any cell (no overlap)
  • A single cell (1×1) counts as a valid square

Find the maximum possible side length of the two equal squares. Constraints: N, M ≤ 700.

Closest LeetCode: 221 (Maximal Square) — but this only covers the base DP.

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!