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

 

first6


Return the index of the first 6 in the array. If there is no 6 in the array, return -1.


first6([4, 1, 6, 7]) → 2
first6([6, 7, 6]) → 0
first6([5, 9]) → -1

...Save, Compile, Run (ctrl-enter)

int first6(int[] nums) { }

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

Difficulty: 100

Copyright Nick Parlante 2017 - privacy