Practise for lintcode.com