get the max depth of a tree
remove duplicates list with two pointers