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

 

Functional-1 > square
prev  |  next  |  chance

Given a list of integers, return a list where each integer is multiplied with itself.


square([1, 2, 3]) → [1, 4, 9]
square([6, 8, -6, -8, 1]) → [36, 64, 36, 64, 1]
square([]) → []

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

public List<Integer> square(List<Integer> 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: 203

Copyright Nick Parlante 2017 - privacy