You are viewing a single comment's thread. Return to all comments →
Maybe a bit shorter and sweeter (build map on reading) and a single pass afterwards.
https://www.hackerrank.com/challenges/beautiful-pairs/submissions/code/31918682
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 →
Maybe a bit shorter and sweeter (build map on reading) and a single pass afterwards.
https://www.hackerrank.com/challenges/beautiful-pairs/submissions/code/31918682