Is this considered cheating?

Just look at the solutions if you don’t want to try to write it yourself:

1 Like