class Solution { public int findDuplicate(int[] nums) { if(nums == null || nums.length<=1) return -1; int fast = 0, slow = 0; while (true){ fast = nums[nums[fast]]; slow = nums[slow]; if(fast == slow){ fast = 0; while(nums[slow] != nums[fast]){ fast = nums[fast]; slow = nums[slow]; } return nums[slow]; } } } }
链表转红黑树缺点或者叫代价或者怎么转的
提了一下红黑树
什么是脏读、幻读
mvcc(不会)
算法,n+1个树字,有1个重复,输出他