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

The challenge was:

---

We get a list of up to 50 activities and an associated calorie value for each (either positive or negative), we need to find a subset of activities where the sum of all the calorie values is zero.

---

Did anyone else here immediately think to write a function hard coded to return the empty set?



Hehe yes, and I feel kinda bad for that. I think it's some permanent damage that I picked up from pair programming using unit tests and my desire to troll my pair partner into doing all the actual typing.




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

Search: