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

 

listAddLargestValue


Given a List of Integers called lst, add a new element to the end, the value of which is the value of the largest element in the List. Return the List as output.


listAddLargestValue([3, 4, 5]) → [3, 4, 5, 5]
listAddLargestValue([1, 2, 4, 5, 6, 10]) → [1, 2, 4, 5, 6, 10, 10]
listAddLargestValue([5, 0, 3]) → [5, 0, 3, 5]

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

public ArrayList<Integer> listAddLargestValue(ArrayList<Integer> lst){ }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy