In hiring programmers, a common test is the Fizz Buzz test. What are some neat/interesting variations on fizz buzz which keep with about the same difficulty level? Basically, if I asked someone to do a fizz buzz test over email or something, I'd want to make sure they can't just google the code.
Interesting variations of FizzBuzz?
interview
As others have said, I don't think FizzBuzz is appropriate over email, but might be appropriate at some other place (say, at a job fair where you need a way to rapidly discard resumes that are a waste of both the interviewer's and applicant's time to pursue). It's really only appropriate for sorting candidates into two buckets: programmers and not.So with that out of the way, assuming you're targeting an appropriate environment, here are a few other quick ones:Write a function that takes in a two-dimensional array of ints (or a List<? extends List<? extends Number>> or equivalent) and finds the smallest number in each row, and returns the sum of those per-row smallest values. (Or returns the minimum value overall, or the row index which contains the largest minimum, etc.)Print out a portion of Pascal's triangle: specifically, ask them to write a function that takes an integer (a) and prints out the first a rows of Pascal's Triangle.Write a function that prints out a breakdown of an integer into a sum of numbers that have just one non-zero digit. For example, given 43018 it should print 40000 + 3000 + 10 + 8.Related to that, write a function that will accept an integer number of cents and print out a breakdown into pennies, nickels, dimes, quarters, (whatever else you want - half dollars, dollar coins), using the fewest number of coins.Anything from the Coding section of this: http://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions