Skip to content

Latest commit

 

History

History
48 lines (28 loc) · 888 Bytes

README.md

File metadata and controls

48 lines (28 loc) · 888 Bytes

nextLargest

Playing with https://www.reddit.com/r/dailyprogrammer/comments/67q3s6/20170426_challenge_312_intermediate_next_largest/

> stack install
> nextLargest --output compare.html

[2017-04-26] Challenge #312 [Intermediate] Next largest number

submitted by jnazario2

Description

Given an integer, find the next largest integer using ONLY the digits from the given integer.

Input Description

An integer, one per line.

Output Description

The next largest integer possible using the digits available.

Example

Given 292761 the next largest integer would be 296127.

Challenge Input

1234 1243 234765 19000

Challenge Output

1243 1324 235467 90001

Credit

This challenge was suggested by user /u/caa82437, many thanks. If you have a challenge idea, please share it in /r/dailyprogrammer_ideas and there's a good chance we'll use it.