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

 

abraskin@mbusd.org 2016_practice_set_5 > doubleVals
prev  |  next  |  chance

Given an array of values, return an equally sized array where each element has twice the value of the original array.


doubleVals([0, 1, 2]) → [0, 2, 4]
doubleVals([-5, -3, -1, 1, 3, 5]) → [-10, -6, -2, 2, 6, 10]
doubleVals([1, 2, 3, 4, 5]) → [2, 4, 6, 8, 10]

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

public int[] doubleVals(int[] arr) { }

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