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

 

norm.krumpe@muohio.edu homework4 > insertSum
prev  |  next  |  chance

Given an array with exactly two numbers, return an array with three numbers, with the same first and last elements as the given array, and with the middle number equal to the sum of those elements.


insertSum([3, 4]) → [3, 7, 4]
insertSum([0, 0]) → [0, 0, 0]
insertSum([9, 1]) → [9, 10, 1]

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

int[] insertSum(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