Professional Documents
Culture Documents
- Math Challenge
Have the function MathChallenge(num) take the input, which will be an integer
ranging from 1 to 250, and return an integer output that will specify the least
number of coins, that when added, equal the input integer. Coins are based on a
system as follows: there are coins representing the integers 1, 5, 7, 9, and 11. So
for example: if num is 16, then the output should be 2 because you can achieve the
number 16 with the coins 9 and 7. If num is 25, then the output should be 3 because
you can achieve 25 with either 11, 9, and 5 coins or with 9, 9, and 7 coins.
In this MySQL challenge, your query should return all the people who report to
either Jenny Richards or have a NULL value in ReportsTo. The rows should be ordered
by Age. Your query should also add a column at the end with a title of Boss Title
where the value is either None or CEO. Your output should look like the following
table.
https://s3.amazonaws.com/coderbytestaticimages/editor/challenges/boss.png
For the input above, your program should return the string 5 2 1 9 6 8 4 because
that is the pre-order traversal of the tree.