Talk:Next highest int from digits: Difference between revisions

Content added Content deleted
(Using Permutations)
No edit summary
Line 48: Line 48:


==Using Permutations==
==Using Permutations==
Don't sort the permutations and then search for the specified condition. Map the permutations subtracting the original value. Reduce the Map to the smallest result greater than -1. If the final result is 0 return 0 else return the original value plus the final result.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:46, 22 February 2020 (UTC)
Don't sort the permutations and then search for the specified condition. Map the permutations subtracting the original value. Reduce the Mapping to the smallest result greater than 0. If None return 0 else return the original value plus the final result.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:46, 22 February 2020 (UTC)