remove duplicates and if duplicates are allowed at most twice
Merge branch 'master' of https://github.com/rafaelfang/LeetCode