DEV Community

Cover image for Stripe OA — Real Exam Questions Sharing & Preparation Insights
net programhelp
net programhelp

Posted on

Stripe OA — Real Exam Questions Sharing & Preparation Insights

Stripe is a well-known payment processing company that handles global payment processing at massive scale, and their online assessment reflects exactly that: the questions are practical, business-related, and unexpectedly unique compared to typical Big Tech OAs. Additionally, Stripe’s OA question bank is rumored to be relatively small, so many candidates often encounter repeated problems. Below is a detailed compilation of real Stripe OA questions—including explanations, examples, and what skills each question is testing. If you're preparing for Stripe, these are absolutely must-practice problems.

Coding Question 1 — Count 2x2 Sub-Squares with Exact Black Cell Counts

You are given a grid consisting of black and white squares. The grid size is defined by rows and cols. You also receive an array black, containing coordinates of all black squares in the form [row, col]. Your task is to determine how many 2×2 sub-squares contain exactly 0, 1, 2, 3, or 4 black squares. You must return an array of length 5, where index i represents the number of 2×2 squares that contain exactly i black cells.

A key detail: Every coordinate in black is unique. No duplicates.

Example

Grid size: rows = 3, cols = 3

Black squares: [[0, 0], [0, 1], [1, 0]]

All possible 2×2 areas:

  • 1 square contains exactly 0 black cells
  • 2 squares contain exactly 1 black cell
  • 0 squares contain exactly 2 black cells
  • 1 square contains exactly 3 black cells
  • 0 squares contain 4 black cells Final output: [1, 2, 0, 1, 0] This problem tests your ability to index grids efficiently, avoid double counting, and use dictionary/coordinate-based lookups for performance.

Coding Question 2 — Count Number Pairs Differing by Exactly One Digit

You are given an array numbers. A “number pair” is valid if:

  1. i < j
  2. the two numbers have the same length
  3. they differ by exactly one digit (not zero, not more than one)
  4. identical numbers do not count as valid pairs

Your job: count all such valid pairs.

Example

Input:

numbers = [1,151,241,1,9,22,351]

Output: 3

Explanation:

  • 1 and 9 differ by one digit → valid
  • 151 and 351 differ by one digit → valid
  • There are two occurrences of 1, so each can pair with 9 → +1 Total = 3 pairs This problem tests string manipulation, hashing by length, and digit-comparison logic.

Coding Question 3 — SQL: Count Active Websites per Customer

You are working with two tables:

customers

  • id (INT, PK)
  • email (VARCHAR)

sites

  • customer_id (INT, FK)
  • url (VARCHAR)
  • is_active (BOOLEAN, 1 = active)

Your task is to produce a report listing:

  • each customer’s email
  • the number of active websites they own (total_active_sites)
  • rows sorted in ascending order by email
  • only include active sites

This question evaluates your understanding of LEFT JOIN, filtering, grouping, and sorting.

ProgramHelp: Professional Interview Helper

Whether you don’t know how to write code, have questions about homework, are preparing for an interview, or need someone to give you real-time guidance during an exam, ProgramHelp provides professional, reliable, and discreet assistance. From algorithm problems to system design to live coaching during online tests, our team ensures you never face academic or career challenges alone. Just reach out—ProgramHelp has your back.

Top comments (0)