leetcode plus one and sqrt and triangle