Skip to main content
10 events
when toggle format what by license comment
Feb 20, 2012 at 21:33 comment added user177800 @Ahmad a solution is better than no solution, which is what they ended up with. That is my point.
Feb 20, 2012 at 21:32 history edited user177800 CC BY-SA 3.0
added 273 characters in body
Feb 20, 2012 at 21:27 comment added user177800 a brute force approach is a solution, better than no solution at all.
Feb 20, 2012 at 21:10 comment added onit @BrokenGlass Definitely a much better solution. I was just coming up with that idea and then you posted the algorithm.
Feb 20, 2012 at 21:04 comment added BrokenGlass There certainly are much better solutions than brute force, e.g. ardendertat.com/2012/01/02/…
Feb 20, 2012 at 21:04 comment added dantuch @benjamin han, there is algorithmic solution. Just keep swaping digits starting from right, till you find the result. There's no need to compute all permutatnios before.
Feb 20, 2012 at 21:03 comment added Ahmad Y. Saleh If I was the interviewer, I wouldn't be so happy with a brute force approach.
Feb 20, 2012 at 21:01 comment added bhan Well my first comment off the bat was "I could brute force it but...". If there really isn't an algorithmic solution, I'm kind of disappointed
Feb 20, 2012 at 20:58 history edited user177800 CC BY-SA 3.0
added 345 characters in body
Feb 20, 2012 at 20:53 history answered user177800 CC BY-SA 3.0