Coding algo is the easy part, no matter the language. Coding also with positive expectancy is one of the challenge.
The following tips may help noobs: Think outside the square, Put the problem in front of you, focus hard on it, and never let up thinking on how to solve this dilemma.