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

 

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

Write a method that merges two equal-length arrays into one array by taking the larger of the two numbers at each position. If there is a tie for largest, you can use either one of them because they are the same. Look at the test data for examples.


test2021_09_02_HL_greatest([17, 23, 55, 8, 45, 89, 22], [8, 35, 56, 9, 40, 80, 20]) → [17, 35, 56, 9, 45, 89, 22]
test2021_09_02_HL_greatest([8, 124, 36, 235, 44], [200, 100, 50, 222, 41]) → [200, 124, 50, 235, 44]
test2021_09_02_HL_greatest([241], [543]) → [543]

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

public int[] test2021_09_02_HL_greatest(int[] nums1, int[] nums2) { }

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

Copyright Nick Parlante 2017 - privacy