Documentation ¶ Overview ¶ Package solution contains Solution to Challenge #045, run TestSolution for test cases Index ¶ func Rand5() int func Rand7() interface{} Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Rand5 ¶ func Rand5() int Rand5 will return random number between `1 and 5 (inclusive)` with uniform probability of `1/5` func Rand7 ¶ func Rand7() interface{} Rand7 using Rand5... As `7` if not one of the power of `5`, hence it will not be possible to generate random number between `1 and 7` uniformly using Rand5 in finite time; and hence a different approach of infinite series is considered. Types ¶ This section is empty. Source Files ¶ View all Source files code.go Click to show internal directories. Click to hide internal directories.