I hereby claim:
- I am douglasjose on github.
- I am douglasjose (https://keybase.io/douglasjose) on keybase.
- I have a public key whose fingerprint is E01C 11EC 8375 BB13 FD22 2CAC 91D7 05ED 400F 52DF
To claim this, I am signing this object:
import scala.io.Source | |
object WordFinder { | |
// All permutations of the characters in the string | |
def permutations(s: String): List[String] = s.toSeq.permutations.map(_.unwrap).toList | |
// All distinct substrings obtained by removing one character from the original string | |
def subsets(s: String): List[String] = { | |
if (s.length == 1) List(s) else { |
I hereby claim:
To claim this, I am signing this object:
package com.douglasjose.tech | |
/** | |
* "Cheryl's Birthday" solution in Scala, based on the solution from Peter Norvig at | |
* http://nbviewer.ipython.org/url/norvig.com/ipython/Cheryl.ipynb | |
* | |
* @author Douglas José (@douglasjose) | |
*/ | |
class CherylsBirthday { |