Talk:Next highest int from digits: Difference between revisions
Content added Content deleted
(→Next_permutation: add link.) |
(→Ambiguities in task statement: (Needs a clearer and simpler formulation, with fewer ambiguities)) |
||
Line 28: | Line 28: | ||
==Next_permutation== |
==Next_permutation== |
||
Someone on [https://www.reddit.com/r/coding/comments/f796q1/next_highest_int_from_digits/fi9uyx1?utm_source=share&utm_medium=web2x Reddit] r/coding posted a cryptic `std::next_permutation()`. Some searching shows that if it produces the next lexicographic permutation thn it is doing all the heavy lifting! [https://www.nayuki.io/page/next-lexicographical-permutation-algorithm Try this explanation]. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 11:52, 21 February 2020 (UTC) |
Someone on [https://www.reddit.com/r/coding/comments/f796q1/next_highest_int_from_digits/fi9uyx1?utm_source=share&utm_medium=web2x Reddit] r/coding posted a cryptic `std::next_permutation()`. Some searching shows that if it produces the next lexicographic permutation thn it is doing all the heavy lifting! [https://www.nayuki.io/page/next-lexicographical-permutation-algorithm Try this explanation]. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 11:52, 21 February 2020 (UTC) |
||
==Ambiguities in task statement== |
|||
Perhaps current phrasing imposes a bit more effort on the reader than it really needs to: |
|||
''the task is to generate the next largest integer using only the given digits.'' |
|||
So this is in the sense in which Lyons is '''the next largest''' town in France after Paris ? We are moving down ? |
|||
''Using only the the given digits'' |
|||
This is as in "Using only a straight edge and a pair of compasses" ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 16:45, 21 February 2020 (UTC) |