Given two int
arrays a
and b
, each with two elements, return a new array with four elements containing all the elements of a
followed by...
CodeWorkout - X41-X50 - Arrays and Arrays and Arrays
Score: 0 / 9.0
Exercises
Given an int
array of any length, return a new array of its first 2 elements. If the array is smaller than length 2, use whatever...
Write a function in Java that takes an int
array as its parameter and returns the number of even int
s it contains. Note: the %
"mod"...
Given an int
array, return the sum of the numbers in the array, except ignore sections of numbers starting with a 6 and extending to the...
We'll say that a value is "everywhere" in an array if for every pair of adjacent elements in the array, at least one of the pair is that...
Given an int[]
array, write a function that returns an array where all the 10's have been removed. The remaining elements should shift...
Write a function in Java that takes an array and returns the sum of the numbers in the array, or 0 if the array is empty. Except the...
Given an array of int
values, return true if the array contains either 3 even or 3 odd values all next to each other.
For each multiple of 10 in the given array, change all the values following it to be that multiple of 10, until encountering another...