Code Puzzles + Solution

  1. Translate Word Problem into Model and List Variable
    Blog Puzzle Post: C# HERE
    Puzzle Question: I would like a list of named people and a collection of their games. I want each of the games in the collection to have a name, console associated with it, and optional release date. How would I make a model and a variable that includes this list of people and all of their games? How can I use C# and put this into a model and call a variable for the list?

  2. Fizz Buzz
    Blog Puzzle Post: C# HERE
    Blog Puzzle Post: Java HERE
    Puzzle Question: This is a common puzzle for programming and heard to be used in interviews. "Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

  3. Reverse a String
    Blog Puzzle Post: C# HERE
    Puzzle Question: Reversing a string using an array method (not doing the obvious Array.Reverse); method, it is more fun to do it with a loop!

  4. Input/Output Line Count Puzzle
    Blog Puzzle Post: C# HERE
    Puzzle Question: Files and Directories on disk puzzle: Given an input directory that is passed into the method (For example: C:\work\input_files). There will be n text files in this directory. For simplicity, all text files will end with the extension .txt. Anything else can be ignored. Each text file will contain n number of lines. Find the total number of lines in all the files. (For example, if there are 3 files, file #1 has 3 lines, file #2 has 200 lines, file #3 has 20 lines, you should return 223).

  5. Project Euler Problems
    I skipped #1 because it's basically the same idea as Fizz Buzz.
    Blog Puzzle Post: Problem #2 HERE (C#)
    Blog Puzzle Post: Problem #3 HERE (C#)
    Puzzle Question: Solving problems from here for fun: https://projecteuler.net/