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.
NOTE: I did use a Counter to make finding the amounts of each number easier. If you would like to use my approach, make sure to add the following at the top:
fromcollectionsimportCounter
`
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Picking Numbers
You are viewing a single comment's thread. Return to all comments →
Here is my easy Python code! We find the amount of each number and find the maximum sum between two consecutive numbers.
NOTE: I did use a Counter to make finding the amounts of each number easier. If you would like to use my approach, make sure to add the following at the top:
`