Course:
- 看了官方answer,Similar to my first approach,AllsortedLater in the new listappend。But I think I can’t prove the correctness,Because it is Zhou Sai dare not submit at will。
- Discover when thinking about the first solution,If I keepfor i in Whole array,Determine whether to meet the conditions and then exchange the position,What should I do if I enter the dead cycle??If a special case fails every time, it needs to be exchanged. What is the difference between random disruption??
- After watching the solution of other big guys,I am still too young
1 | def rearrangeArray(self, nums: List[int]) -> List[int]: |