Timeline for Building a list - why is this code inefficient?
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 9, 2014 at 19:24 | comment | added | Cary Swoveland |
How about: a = string.chars.sort; 1.upto(a.size) { |i| a.combination(i).each { |c| puts c.join } } ?
|
|
Jul 3, 2014 at 0:31 | comment | added | RubberDuck | No problem. You're also welcome to join us in the chat room anytime. | |
Jul 2, 2014 at 23:35 | comment | added | RubberDuck | Please do not update the code in your question after people have answered. This meta post explains why. | |
Jul 2, 2014 at 23:34 | history | rollback | RubberDuck |
Rollback to Revision 5
|
|
Jul 2, 2014 at 23:31 | history | edited | niftygrifty | CC BY-SA 3.0 |
made variable name more expressive
|
Jul 2, 2014 at 20:41 | comment | added | Flambino | A 2200x speedup... not bad :) | |
Jul 2, 2014 at 12:13 | answer | added | RubberDuck | timeline score: 4 | |
Jul 2, 2014 at 12:00 | history | edited | niftygrifty | CC BY-SA 3.0 |
added code that resulted from accepted answer
|
Jul 2, 2014 at 11:53 | vote | accept | niftygrifty | ||
Jul 2, 2014 at 8:30 | answer | added | Nat | timeline score: 4 | |
Jul 2, 2014 at 5:05 | history | edited | niftygrifty | CC BY-SA 3.0 |
removed inconsistency
|
Jul 2, 2014 at 5:02 | history | edited | Jamal | CC BY-SA 3.0 |
No need to have a separate updated code block
|
Jul 2, 2014 at 4:49 | history | edited | niftygrifty | CC BY-SA 3.0 |
added update on progress solving thsi problem
|
Jul 2, 2014 at 1:32 | history | asked | niftygrifty | CC BY-SA 3.0 |