finished convertToSumTree, sortedLLToBalancedBST and detectCycleDirected