Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tried on #3 the most inefficient algorithm I could come up with - blindly going through all possible combinations and checking if their biggest member is equal to the sum of the rest. Time of the execution: 0.6s

I am not sure if this step of allowing the "shortcuts" was part of the game or not. All that would had to be done is to give 128 elements of the array to exclude at least the most blatant brute-forcing.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: