Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 888. Fair Candy Swap
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.