Skip to content

A Ruby 2.2 demo program which creates all possible upper/lower case permutations of an input string

License

Notifications You must be signed in to change notification settings

edwinmeyer/permute_string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

###Permute String ####Coding Exercise Edwin Meyer

####Summary Given an input alphabetic string of arbitrary length generate an array containing all possible string permutations produced by swapping the case of the individual alpha characters.

Each version can be coded in under ten lines. However the problem has some subtleties which require modest analytical thinking prior to coding.

permute_string.rb contains two solutions, one using recursion, the other iteration. It also contains a short test harness that exercises the two methods permute_string_recurse & permute_string_iterate. When presented as a coding test, the test harness can be be provided for testing the two solutions.

About

A Ruby 2.2 demo program which creates all possible upper/lower case permutations of an input string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages