Available question text
Given two arrays of positive integers representing candy box sizes for Alice and Bob, find one pair (a from Alice, b from Bob) such that swapping them makes their total sums equal. Key insight: compute the required difference delta = (sumA - sumB)/2 and find a and b with a - b = delta (e.g., via a set lookup).
Related questions
Continue with questions that share topics or the same question type.
- Can You Eat Your Favorite Candy on Your Favorite Day
Coding
- Candy
Coding
- Candy Crush
Coding · Array · Matrix · Simulation
- Check if One String Swap Can Make Strings Equal
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 888. Fair Candy Swap
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source