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

 

jebbert@volusia.k12.fl.us > oct23_2017_HL_biggestCombo
prev  |  next  |  chance

Write a method that returns the greatest sum possible using exactly two different elements from the input parameter array. If the input parameter array has less than two elements, return zero. One possible way of solving this problem would be to use backtrack recursion. However, recursion is NOT required!


oct23_2017_HL_biggestCombo([5, 8]) → 13
oct23_2017_HL_biggestCombo([]) → 0
oct23_2017_HL_biggestCombo([2346, 123, 436, 15634, 4739, 235, 2356, 767, 976, 235]) → 20373

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

public int oct23_2017_HL_biggestCombo(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: 290

Copyright Nick Parlante 2017 - privacy