See the original problem on HackerRank.
Solutions
This exercise is very easy. At Coding Gym we experiment with such exercises to learn more.
Some solutions follow.
C++:
|
|
C#:
|
|
Python:
|
|
Ruby:
|
|
Haskell:
|
|
See the original problem on HackerRank.
This exercise is very easy. At Coding Gym we experiment with such exercises to learn more.
Some solutions follow.
C++:
|
|
C#:
|
|
Python:
|
|
Ruby:
|
|
Haskell:
|
|