Written in Javascript (NodeJs)
- Best results
- Optimised
- Could be better for sure :)
- Create two loops
- Traverse the current Pizza array in reverse order and restart by removing the last value
- When I add a value inside the sum, if it's bigger than the max value, I replace the last value inside the list by this value.
- Optimise all stuff...
Solution for the Practice Round of Google Hash Code 2020 - Score: 1,505,004,616
File | Score |
---|---|
a_example | 16 points |
b_small | 100 points |
c_medium | 4,500 points |
d_quite_big | 1,000,000,000 points |
e_also_big | 505,000,000 points |
Total | 1,505,004,616 points |
Time to resolve all solutions | 0.17s. |