-
-
Save xrrocha/23894a58f20e690adfff28287462b294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<String> edits2(String typo) { | |
// Repeatedly apply all 4 edits twice, and in parallel, to each split. | |
// Packing removes duplicates, ensures result presence in dictionary and | |
// orders by rank | |
return | |
pack(edits1(typo).parallelStream() | |
.flatMap(w -> edits1(w).stream())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment