about | help | code help+videos | done | prefs |
interleave
Write a method called interleave that accepts two integer arrays as parameters and returns a new array that contains the result of interleaving the two arrays. For example, if arrays list1 and list2 store {2, 4, 6} and {10, 20, 30, 40, 50} respectively, the call of interleave(list1, list2) should return a new array containing {2, 10, 4, 20, 6, 30, 40, 50}. interleave([2, 4, 6], [10, 20, 30, 40, 50]) → [2, 10, 4, 20, 6, 30, 40, 50] interleave([], [3, 4, 5]) → [3, 4, 5] interleave([], []) → [] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy