We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If anyone gets caught up on test case 4 and 5. Know that the optimal amount of beautiful pairs does not always mean the maximum amount. You have to always change 1 element in B even if you end up with one less pair than if you didn't.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Pairs
You are viewing a single comment's thread. Return to all comments →
If anyone gets caught up on test case 4 and 5. Know that the optimal amount of beautiful pairs does not always mean the maximum amount. You have to always change 1 element in B even if you end up with one less pair than if you didn't.