Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 2.52 KB

bonus.md

File metadata and controls

49 lines (38 loc) · 2.52 KB

#Bonus Challenges

###Exercises

FizzBuzz

  1. Project Euler #1 - Multiples of 3 and 5
  2. Modify this code to write FizzBuzz. Print out each of the numbers from 1 to 1000. If the number is divisible by 3 then print "Fizz" instead of the number. If the number is divisible by 5 then print "Buzz" instead of the number. If the number is divisible by both then print "Fizzbuzz".
  3. Modify this code again: instead of replacing numbers if they are divisible by 3 and 5, print "Fizz" if the number contains a 3 and "Buzz" if the number contains a 5, and "Fizzbuzz" if it contains both.
  4. Read this for more on FizzBuzz.

Collatz

  1. Project Euler #14 - Longest Collatz sequence
  2. Modify this code so that it takes in the starting number as a parameter.
  3. Modify this code so that it prints out each chain.
  4. Modify this code so that it only prints out the longest chain found so far, whenever a new longest chain is encountered.
  5. Modify this code so that it only prints out the longest chain under the starting number.
  6. See also: Collatz Conjecture

Weekdays

  1. Project Euler #19 - Counting Sundays
  2. Find a Java date library and solve this problem again, using that library.
  3. Find another Java date library. Implement this solution again, using the new date library.
  4. What day of the week were you born?
  5. Read more about programming and time.

Currency

  1. Project Euler #31 - Coin sums
  2. How many different ways can you make $2 with American coins?
  3. How many different ways can you make $2 with Canadian coins?
  4. Read more on dynamic programming and the coin change problem.

The Game of Life

The Game of Life

Create Bonus Challenges for the Assessment!

Create some bonus challenges for the assessment. Bonus challenges should be of the following format:

/*
* Comment describing what the challenge is
*/
public static RETURN_TYPE METHOD_NAME (PARAMETER_TYPE PARAMETER) {

  return DEFAULT_VALUE;
}