CodeX
Published in

CodeX

Lexicographic Permutation Algorithm in Ruby

A simple algorithm coded in Ruby to find the next lexicographic permutation explained in detail.

What is a Lexicographic Permutation?

A permutation of a string or integer refers to the possible arrangements of the characters or numerals within the set. For example, “ab” has two permutations: “ab” and…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anthony Lepore

Anthony Lepore

Composer, playwright, designer for theater, jazz musician, philosopher, software engineer and technical writer for a FinTech firm in NYC. More: ViolaCello93.com