Try to solve each of the following. Click the Check Me button to check each solution. You will be told if your solution is too short, has a block in the wrong order, or you are using the wrong block. Some of the problems have an extra block that isnβt needed in the correct solution. Try to solve these on your phone or other mobile device!
The following method should recursively reverse the string that is passed in the parameter and return the reversed string. It if is passed βabcdβ it should return βdcbaβ. It has one extra block that is not needed in a correct solution.
The following method should recursively return the fibonacci sequence of the first n numbers. The fibonacci (f) of f(0) is 0 and of f(1) is 1. The fibonacci of any other number is f(n-1) + f(n-2). It has one extra block that is not needed in a correct solution.
The following method should recursively replace all the spaces in the String str with dashes. It has one extra block that is not needed in a correct solution.
The following method should recursively count and return the number of 2βs that are present in the number. It has one extra block that is not needed in a correct solution.
The following method should recursively find and return the sum of the digits of int n. It has one extra block that is not needed in a correct solution.