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.
yeah that seems simple for sure , But is there a way to solve it just using one loop ?
I tried but all the tests didn't pass.
However using 2 separate loops did it .
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →
yeah that seems simple for sure , But is there a way to solve it just using one loop ? I tried but all the tests didn't pass. However using 2 separate loops did it .