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

 

getIndex


Return the index of the value n in the array nums or -1 if it isn't found in the array.


getIndex(-2, [9, -3, 5, 7, -2]) → 4
getIndex(3, [9, -3, 5, 7, -2]) → -1
getIndex(9, [9, -3, 5, 7, -2]) → 0

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

public int getIndex(int n, 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: 230 Post-solution available

Copyright Nick Parlante 2017 - privacy