Premium Only Content
Leetcode solving: 888 Fair Candy Swap
Leetcode solving: 888 Fair Candy Swap
Alice and Bob have candy bars of different sizes: aliceSizes[i] is the size of the i-th bar of candy that Alice has, and bobSizes[j] is the size of the j-th bar of candy that Bob has.
Since they are friends, they would like to exchange one candy bar each so that after the exchange, they both have the same total amount of candy. (The total amount of candy a person has is the sum of the sizes of candy bars they have.)
Return an integer array ans where ans[0] is the size of the candy bar that Alice must exchange, and ans[1] is the size of the candy bar that Bob must exchange.
If there are multiple answers, you may return any one of them. It is guaranteed an answer exists.
####################################
Please subscribe to my channel
My other Leetcode solving videos (easy)
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4oUpNyWU_0rOItlScu1_d
Leetcode solving videos (Medium):
https://www.youtube.com/playlist?list=PLg9w7tItBlZvMGxy-y1eXURPD6Ao6kkzA
Leetcode solving videos (Hard):
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4JQmlkGD3M5idZn14NyL6
########################################
-
2:57:41
Laura Loomer
11 hours agoEP91: BIG TECH BILLIONAIRE TAKEOVER: Will MAGA Get the Justice We Deserve?
99.3K126 -
1:11:49
Man in America
16 hours agoWhat They're HIDING About Europe's RAPE CRISIS Will SHOCK You
60K110 -
5:41:33
The Sufari Hub
11 hours agoUPGRADING OUR GEAR : Fallout 4 : BEATING MAIN STORY FOR THE FIRST TIME!
34.7K -
1:04:50
PMG
19 hours ago $10.44 earnedTraditional Southern Values Ain't Dead Yet w/ Stacy Lyn Harris
74.4K1 -
1:26:43
Kim Iversen
14 hours agoHOLY SH*T! Zuckerberg DROPS CENSORSHIP Policy—Is Free Speech BACK? | Trump’s AMBITIOUS Move to Claim Greenland, Panama Canal & Canada
96.3K230 -
1:36:15
Glenn Greenwald
15 hours agoWhat Mark Zuckerberg’s New Misinfo Policy Means For Internet Freedom; The Disinformation Complex: Dismantled At Last? | SYSTEM UPDATE #384
140K162 -
1:16:42
Adam Does Movies
19 hours ago $3.59 earnedHUGE Movies Releasing In 2025! + Movie News - LIVE!
47.3K4 -
58:40
Flyover Conservatives
15 hours agoZuckerberg’s Shift: The Mar-a-Lago Effect or Strategic Realignment? - Clay Clark | FOC Show
44.6K6 -
3:41:55
The Original Next Level Gaming
12 hours agoTuesday Night Live W/ Peter & Mike: The Return to Remnant II
36.7K4 -
1:28:24
Anthony Rogers
16 hours agoEpisode 351 - Is Cancel Culture Over?
24.8K3