Skip to main content

Timeline for Sorting three numbers

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Jun 24, 2016 at 21:50 history edited mdfst13 CC BY-SA 3.0
deleted 1 character in body
Sep 25, 2013 at 9:44 history edited azz CC BY-SA 3.0
added 2 characters in body
Sep 25, 2013 at 5:44 history edited azz CC BY-SA 3.0
added 36 characters in body
Sep 25, 2013 at 5:40 comment added azz @200_success Modified to address first two comments. Changed to TreeMap<Integer, Character> and used resulting entrySet() with StringBuilder.
Sep 25, 2013 at 5:39 history edited azz CC BY-SA 3.0
added 36 characters in body
Sep 25, 2013 at 5:19 comment added 200_success The Map doesn't handle duplicate values well at all, though!
Sep 25, 2013 at 5:18 comment added 200_success You also don't need items — you can just get it from vars.keySet(), which is guaranteed to be a SortedSet if vars is a TreeMap.
Sep 25, 2013 at 5:14 comment added 200_success I would use a TreeMap<Integer,Character> instead. TreeMap automatically keeps its keys sorted, and doesn't require an explicit Collections.sort(). Also, using Character avoids the ""+c hack.
Sep 25, 2013 at 5:03 review First posts
Sep 25, 2013 at 5:52
Sep 25, 2013 at 4:49 history edited azz CC BY-SA 3.0
added 1 characters in body
Sep 25, 2013 at 4:43 history answered azz CC BY-SA 3.0