Timeline for 2048 game: logic implementation
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 6, 2018 at 9:48 | history | edited | papagaga | CC BY-SA 4.0 |
refined algorithm
|
| Sep 6, 2018 at 8:28 | history | edited | papagaga | CC BY-SA 4.0 |
added 7 characters in body
|
| Sep 6, 2018 at 8:28 | comment | added | papagaga |
@pls Yes, you're perfectly right, I should have used std::stable_partition. Let me edit my answer...
|
|
| Sep 6, 2018 at 3:38 | comment | added | pls | Thanks for your answer. I think it is well articulated and demonstrates the algorithm library well. However doesn't std::partition lose relative order? Would, for instance, the range {2, 2, 4, 0} possibly be partitioned to {0, 2, 4, 2} and thus miss the combination of 2 and 2? | |
| Sep 5, 2018 at 14:46 | history | answered | papagaga | CC BY-SA 4.0 |