# Exercises

0 / 50

Write a method called `listUpper()` that takes in a list of strings, and returns a list of the same length containing the same strings but...

0 / 50

Write a method called `listSearch()` that takes in a target string and a list of other strings. This method returns a (possibly shorter)...

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, return a string where for every char in the original, there are two chars.

0 / 20

Given a string, consider the prefix string made of the first N chars of the string. Does that prefix string appear somewhere else in the...

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...

0 / 30

Returns true if for every '*' (star) in the string, if there are chars both immediately before and after the star, they are the same.

0 / 30

Given two strings, `base` and `remove`, return a version of the `base` string where all instances of the `remove` string have been removed (not...

0 / 20

Given a string, return true if the number of appearances of "is" anywhere in the string is equal to the number of appearances of "not"...

0 / 20

We'll say that a "triple" in a string is a char appearing three times in a row. Return the number of triples in the given string. The...

0 / 20

We'll say that a lowercase 'g' in a string is "happy" if there is another 'g' immediately to its left or right. Return true if all the...

0 / 30

Given a string, return the length of the largest "block" in the string. A block is a run of adjacent chars that are the same.

0 / 40

Given a string, look for a mirror image (backwards) string at both the beginning and end of the given string. In other words, zero or...

0 / 50

Given a string, return the sum of the numbers appearing in the string, ignoring all other characters. A number is a series of 1 or more...

0 / 40

Given a string, return a string where every appearance of the lowercase word "is" has been replaced with "is not". The word "is" should...

0 / 10

Write the missing base case for function 'largest'. Function 'largest' should find the largest number in array "numbers". Note that when...

0 / 10

For function 'multiply', write the missing base case condition and action. This function will multiply two numbers "x" and "y". You can...

0 / 10

The greatest common divisor (GCD) for a pair of numbers is the largest positive integer that divides both numbers without remainder. For...

0 / 10

For function 'log', write the missing base case condition and the recursive call. This function computes the log of "n" to the base "b"....

0 / 10

For function 'sumtok', write the missing recursive call. This function returns the sum of the values from 1 to "k".

0 / 10

For function `addodd()` write the missing recursive call. This function should return the sum of all postive odd numbers less than or equal...

0 / 10

For function 'sumOfDigits', write the missing recursive call. This function takes a non-negative integer and returns the sum of its...

0 / 10

For function `countChr` write the missing part of the recursive call. This function should return the number of times that the letter "A"...

0 / 10

For function 'recursiveMin', write the missing part of the recursive call. This function should return the minimum element in an array of...

0 / 10

For function 'isReverse', write the two missing base case conditions. Given two strings, this function returns true if the two strings...