Skip to main content

Timeline for Collapse Adjacent Duplicates

Current License: CC BY-SA 3.0

4 events
when toggle format what by license comment
Jul 27, 2017 at 9:35 comment added Cody Gray @musicman523 My first attempt did implement it by hand, although I used a little bit different algorithm. I was adapting the implementation of std::unique to do what I needed. But it takes a lot of code to do all the logic, and when I happened across std::adjacent_find, it was pretty obvious that that was a winner in terms of code size.
Jul 26, 2017 at 17:55 comment added musicman523 C++ isn't the best golfing language. Nice use of std::adjacent_find! I wonder if you implemented this function yourself if it would be shorter, since you can remove #include <algorithm> as well
Jul 26, 2017 at 10:49 history edited Cody Gray CC BY-SA 3.0
added 359 characters in body
Jul 26, 2017 at 10:44 history answered Cody Gray CC BY-SA 3.0