Android Unlock Pattern Leetcode Javascript Problems