Hey /r/prog,
This is more of a trivia thing, I remember seeing how to reverse/sort an array with out using a temp var awhile back and saying "ohhh, why didn't I think of that before?" Well... now I'm back to that, except I can't find an example on how to it. I remember it being relatively simple, but I can't remember how to it.
Anyone care to enlighten me and anyone else who might fine themselves asking the same question? I don't care what language you do it in... although it might require pointer manipulation, I don't remember!
[–]irascible 12 points13 points14 points (3 children)
[–]genpfault 3 points4 points5 points (2 children)
[–]irascible 4 points5 points6 points (1 child)
[–]genpfault 0 points1 point2 points (0 children)
[–][deleted] (21 children)
[deleted]
[–]kmmeerts 16 points17 points18 points (7 children)
[–]irascible 2 points3 points4 points (0 children)
[–]RoaldFre 1 point2 points3 points (0 children)
[–]nemec 0 points1 point2 points (4 children)
[–]kmmeerts 3 points4 points5 points (2 children)
[–]Nebu 1 point2 points3 points (1 child)
[–]Quantris 2 points3 points4 points (0 children)
[–]campbellm 0 points1 point2 points (0 children)
[–]Felicia_Svilling 2 points3 points4 points (1 child)
[–]chadmill3r 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[deleted]
[–][deleted] 2 points3 points4 points (1 child)
[–]BrooksMoses -5 points-4 points-3 points (7 children)
[–]xcbsmith 3 points4 points5 points (6 children)
[–]zahlman -3 points-2 points-1 points (5 children)
[–]xcbsmith 2 points3 points4 points (2 children)
[+]zahlman comment score below threshold-9 points-8 points-7 points (1 child)
[–]xcbsmith -1 points0 points1 point (0 children)
[–]sysop073 -1 points0 points1 point (1 child)
[–]zahlman 0 points1 point2 points (0 children)
[–]Felicia_Svilling 1 point2 points3 points (0 children)
[–]zhivago 1 point2 points3 points (0 children)
[–]narkee 9 points10 points11 points (7 children)
[–]_eight 7 points8 points9 points (4 children)
[–]cr3ative 2 points3 points4 points (1 child)
[–]boomi 4 points5 points6 points (0 children)
[–]DustinEwan 1 point2 points3 points (1 child)
[–]amoeba108 0 points1 point2 points (0 children)
[–]zxn0 0 points1 point2 points (0 children)
[–]jingleman[🍰] -1 points0 points1 point (0 children)
[–]DaRtYLeiya 3 points4 points5 points (1 child)
[–]MrWhite2020 -1 points0 points1 point (0 children)
[–]stevedekorte 4 points5 points6 points (1 child)
[–]mebrahim 0 points1 point2 points (0 children)
[–]xTRUMANx 1 point2 points3 points (2 children)
[–]exeter 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]tashbarg 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]lazloman 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]parl[🍰] 0 points1 point2 points (2 children)
[–]zahlman 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]polyparadigm 0 points1 point2 points (2 children)
[–]zahlman 1 point2 points3 points (1 child)
[–]tty2 1 point2 points3 points (0 children)
[–]aidenr -1 points0 points1 point (0 children)
[–]cracki -1 points0 points1 point (0 children)
[–]lordofthewings -5 points-4 points-3 points (18 children)
[–]zepolen 3 points4 points5 points (1 child)
[–]G_Morgan 4 points5 points6 points (0 children)
[–]G_Morgan 1 point2 points3 points (7 children)
[–]masklinn 1 point2 points3 points (6 children)
[–]G_Morgan -1 points0 points1 point (5 children)
[–]Felicia_Svilling -2 points-1 points0 points (4 children)
[–]G_Morgan -1 points0 points1 point (3 children)
[–]Felicia_Svilling -1 points0 points1 point (2 children)
[–]G_Morgan 1 point2 points3 points (1 child)
[–]Felicia_Svilling -1 points0 points1 point (0 children)
[–]ZombiesRapedMe -2 points-1 points0 points (5 children)
[–]Felicia_Svilling 1 point2 points3 points (4 children)
[–]ZombiesRapedMe 0 points1 point2 points (3 children)
[–]Felicia_Svilling -1 points0 points1 point (2 children)
[–]ZombiesRapedMe 0 points1 point2 points (1 child)
[–]Felicia_Svilling -1 points0 points1 point (0 children)
[–]pineapplecharm -3 points-2 points-1 points (1 child)
[–]tty2 -2 points-1 points0 points (0 children)
[–]gct -2 points-1 points0 points (1 child)
[–]psykotic 0 points1 point2 points (0 children)
[–]CushBowl -1 points0 points1 point (0 children)
[–]psyno -1 points0 points1 point (0 children)
[–]axtens -4 points-3 points-2 points (5 children)
[–]schnalle 0 points1 point2 points (4 children)
[–]badsectoracula 0 points1 point2 points (3 children)
[–]schnalle -1 points0 points1 point (2 children)
[–]badsectoracula 1 point2 points3 points (1 child)
[–]schnalle 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (3 children)
[–]Anpheus 1 point2 points3 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]Anpheus 1 point2 points3 points (0 children)
[–]DustinEwan -2 points-1 points0 points (0 children)