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
########################################
-
14:12
BlabberingCollector
1 day agoHBO Show Update, Audible Full Cast Ensemble Updates, Wizarding World Quick Hits!
67.4K3 -
2:35:48
FreshandFit
14 hours agoShe Watched Our Show, NOW She's Happily Engaged
237K76 -
1:49:19
Badlands Media
13 hours agoBaseless Conspiracies Ep. 158: Trump’s World Order, Israel’s Secrets & the MAGA Infiltration
82.4K27 -
2:54:31
TimcastIRL
9 hours agoIllegal Immigrant ARRESTED After Shooting At DHS, War ERUPTS In Chicago
300K150 -
5:23:34
Drew Hernandez
1 day agoMARK LEVIN CRASHES OUT & TRUMP SEEKS HOUSING CRISIS SOLUTION
29.9K25 -
6:29:18
SpartakusLIVE
10 hours ago#1 King of Content leaves your Monday UTTERLY MOTIVATED
52.9K1 -
2:47:40
Barry Cunningham
11 hours agoBREAKING NEWS: WATCH PARTY WITH PRESIDENT TRUMP ON THE LAURA INGRAHAM SHOW (AND MORE NEWS)
167K44 -
2:36:50
Blabs Games
17 hours agoLet's Get Those 5 Stars! Jurassic World Evolution 3 Playthrough #7
68.8K5 -
1:03:59
Flyover Conservatives
1 day ago$117K Paywall to Protect School’s Indoctrination? The Education System’s Biggest Secret w/ Nicole Solas | FOC Show
56.5K2 -
2:31:34
We Like Shooting
20 hours ago $9.61 earnedWe Like Shooting 636 (Gun Podcast)
46.5K2