Mark presented a standard coding interview question: write code that permutes the characters in a string. The R one-liner isn't nearly as concise as I would have hoped, but then R isn't really known for string manipulation.
> str_permute <- function(x){ paste(strsplit(x, split="")[[1]][ sample( 1:(nchar(x)), nchar(x) ) ], collapse="") } > str_permute("abcdefghijk") [1] "jcakeifhbdg" >
Not seeing a preview button.... well, let's see what this looks like.