Question: CHALLENGE ACTIVITY 7 . 4 . 3 : Compute the distance between element positions. 5 4 1 6 6 4 . 3 8 0 9
CHALLENGE ACTIVITY
: Compute the distance between element positions.
qxzqy
Compute the distance between the positions of the first and last zero element in the given array. For example, if the array is your algorithm should yield
If the array contains a single zero, return If it doesn't contain any zeroes, return a negative value.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
