american express logo
American Express· Summer Internship

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

Posted
13 Aug 2026
101 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.

How it went

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.

Questions asked (2)

  1. 01

    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. 02

    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.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at American Express recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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