Question: A Notepad File Edit Format View Help Start with 2 int arrays, a and b, of any length. Return how many of the arrays have

 A Notepad File Edit Format View Help Start with 2 int

A Notepad File Edit Format View Help Start with 2 int arrays, a and b, of any length. Return how many of the arrays have 1 as their first element. start1([1, 2, 3], [1, 3]) 2 start1(17, 2, 3, [1) 1 starti (I1,2, [ 1 ts length 3, return a new array with the elements in reverse order, so (1, 2, 3) becomes (3, 2, 1). reverse3(1, 2, 31) [3, 2, 1] reverse3(I5, 11, 9]) [9, 11, s] reverseX(7, e, e])-[e, e, 7] 3- Given an array of ints, return true if the array is length 1 or more, and the first element and the last element are equal. sameFirstlast([1, 2, 3]) false sameFirstLast([1, 2, 3, 1]) true sameFirstLast([1, 2, 1]) true 4-Return the number of even ints in the given array, Note: the % "mod" operator computes the remainder, e.g. 5 % 2 is 1. countEvens([2, 1, 2, 3, 4]) 3 countEvens ([2, 2, e])3 countEvens([1, 3, 5) 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!