ScratchData LogoScratchData
Back to deck26's profile

Recursion exercise

DEdeck26•Created July 1, 2020
Recursion exercise
3
2
42 views
View on Scratch

Instructions

Just enter a string of digits and the code will work out the longest string it can. The order of digits cannot be changed and the result should consist of non-descending digits (adjacent duplicates are OK). So if the input was 12454436 the longest string would be 124446 by omitting the 5 and 3. The output may not be the only valid output of that length, there just won't be anything longer.

Description

I was just pondering this one night and thought it was a good project to do using recursion.

Project Details

Project ID408905308
CreatedJuly 1, 2020
Last ModifiedJuly 1, 2020
SharedJuly 1, 2020
Visibilityvisible
CommentsAllowed