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

 

amjadm@miamioh.edu arrays-warmup > getSeq
prev  |  next  |  chance

Given 2 int values named start and end, return a new array filled with all numbers from the start to the end, inclusive. If the start value is greater than the end value, return an empty array.


getSeq(1, 2) → [1, 2]
getSeq(2, 0) → []
getSeq(1, 1) → [1]

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

public int[] getSeq(int start, int end) { }

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

Copyright Nick Parlante 2017 - privacy