RSSAmplifier

Andrew Odendaal

Permutations Alphabetically (Java)

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

The challenge Given a word (a string of lowercase letters), return all its permutations in alphabetical order. Do not use built-in permutation functions. Examples: permutations( 'the' ); // → [eht, eth, het, hte, teh, the] permutations( 'a' ); // → [a] This puzzle is asked on Codewars and HackerRank Java tracks. Two parts trip people up: generating the permutations from scratch, and ordering them…

Read on andrewodendaal.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.