about | help | code help+videos | done | prefs |
has1toEnd
Given a number that contains up to 9 digits, determine if the number contains all the digits from 1 to the length of the number. Return true/false. Do not use any String operations. You need to compare digits. has1toEnd(123456789) → true has1toEnd(321) → true has1toEnd(125) → false ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy