id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

zbaharav@kehillah.org > has1toEnd
prev  |  next  |  chance

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)

boolean has1toEnd(int a){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Copyright Nick Parlante 2017 - privacy