Timeline for Re-sorting an array of integers based on distinct digits from even to odd
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2017 at 12:40 | history | edited | CommunityBot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
Nov 22, 2015 at 17:35 | comment | added | MikeMB |
@Edward: Sorry, I overlooked that requirement, but even then, I wouldn't have returned a raw pointer, but e.g. unique_ptr . Anyway, its only a detail.
|
|
Nov 20, 2015 at 13:19 | comment | added | Edward | @MikeMB - The original poster specifically said without using a vector, so I did it that way, but agree that using one or 'std::array' would be better design. | |
Nov 20, 2015 at 11:20 | comment | added | MikeMB | Yes, but why did you keep it in your code then? | |
Nov 20, 2015 at 9:23 | comment | added | Edward | @MikeMB: Agreed. That was exactly the point I was making in the section titled "reconsider the interface." | |
Nov 20, 2015 at 9:20 | history | edited | Edward | CC BY-SA 3.0 |
corrected typo
|
Nov 20, 2015 at 8:33 | comment | added | MikeMB | Personally, I wouldn't return the array as a raw pointer. Instead I'd return a vector or - if I absolutely must - a unique ptr. Since I have a c++11 compiler, I view almost any delete as a design error. | |
Nov 19, 2015 at 23:07 | vote | accept | Ryu | ||
Nov 19, 2015 at 22:49 | comment | added | erip | While the last point is true, it doesn't make the code more-or-less idiomatic to omit it. Good points otherwise. | |
Nov 19, 2015 at 22:20 | history | answered | Edward | CC BY-SA 3.0 |