ifLinkedListHasACircle and isValidBST