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

 

norm.krumpe@muohio.edu program11 > findAll
prev  |  next  |  chance

Given an array and a key, return an array that contains the locations of all elements that match the key. If no elements match the key, return an array with no elements.


findAll([5, 4, 5], 4) → [1]
findAll([5, 4, 5], 5) → [0, 2]
findAll([5, 4, 5], 6) → []

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

int[] findAll(int[] nums, int key) { }

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: 200

Copyright Nick Parlante 2017 - privacy