Skip to content

SFrijters/example-NextLargest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Playing with Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published