Search Results

Searching for: loops

Individual Exercises

0 / 50

Given start and end integers, return a new array containing the sequence of integers from start up to but not including end, so start = 5...

0 / 50

Return an array that is "left shifted" by one--so for an input of {6, 2, 5, 3}, the method returns {2, 5, 3, 6}. You may modify and...

0 / 50

Given a non-empty array of ints, return a new array containing the elements from the original array that come after the last 4 in the...

0 / 70

We'll say that an element in an array is "alone" if there are values before and after it, and those values are different from it. Return...

0 / 50

Return an array that contains the exact same numbers as the given array, but rearranged so that all the zeros are grouped at the start of...

0 / 70

Given two arrays of ints sorted in increasing order, called outer and inner, return true if all of the numbers in inner also appear in ...

0 / 70

Given n >= 0, create an array of length n * n with the following pattern, shown here for n = 3 : {0, 0, 1, 0, 2, 1, 3, 2, 1} (spaces...

0 / 50

Given two strings, word and a separator sep, return a big string made of count occurrences of the word, separated by the separator...

0 / 50

Write a method called listLength() that takes in a list of strings and returns a list of their lengths as integers. You must create a new...

0 / 20

Given a string, compute a new string by moving the first char to come after the next two chars, so "abc" yields "bca". Repeat this...