alsuga's Algorithm Implementations

I have contributed 4 implementations!

Visit Github Profile
  • 10 harshad number


    Puzzle: A Harshad Number, in a given number base, is an integer that is divisible by the sum of its digit when written in that base. Write a function that returns whether an integer is a Harshad Number or not (in base 10). Solution: Of the numbers ...

  • 99 bottles problem


    # 99 Bottles of Beer # ## Puzzle: ## You must print the lyric of the song as follows: ``` 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall. 98 bottles of beer on the wall, 98 ...

  • ackermann


    In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total computable function that is not primitive recursive. All primitive recursive functions are total and ...

  • happy number


    A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number either equals 1 (where it will stay), or it loops ...