Java Puzzles
A collection of puzzles I worked out in java.
1 - TransposedBinarySearch: Given a sorted list that has been transposed that is, a portion has been removed from one end and attached to the other write a function to determine if a given number is present in the list.
2 - PassTriangle: By starting at the top of the triangle and moving to adjacent numbers on the row below, the maximum total from top to bottom. See comments for example.
3 - RandomWithDistribution: Provided a Map of Strings and distributions, a random string will be returned with probability proportional to its distribution.