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

Added solution: https://github.com/magwo/elevatorsaga/wiki/Solution-by-alber...

Can work for all up to 9, except 5. Can't get it to work. When it has to be done within 'x' moves, change foreach 'e' variable to var `e = <total elevator minus 1>`

Main 'pattern' behind it: the elevators decide everything. Each elevator does the same based on a global array of where passengers are waiting.



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

Search: