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

 

dario.sonego@gmail.com esercicci_array > estremi
prev  |  next  |  chance

Dato un array di interi nums, creare e restituire un array contente il primo elemento e l'ultimo elemento dell'array.
Se l'array di partenza non ha almeno due elementi, si deve restituire un array vuoto.


estremi([2, 12, 3]) → [2, 3]
estremi([12, 30]) → [12, 30]
estremi([10, 20, 50, 60]) → [10, 60]

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

int[] estremi(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: 190

Copyright Nick Parlante 2017 - privacy