Thinking in Solidity
https://blog.cotten.io/thinking-in-solidity-6670c06390a9
This article will help you convert a simple Java program to Solidity to solve a simple integer sorting problem, highlighting many of the perils and pitfalls to avoid in optimizing gas usage — especially pre-mature optimization and algorithm validation.
On May 23rd, 2018 Ethereum’s Nick Johnson posted the first-ever Solidity Gas Golfing Contest on reddit.