[LintCode] Triangle Count