北维州Roofing Contractor及收费# Living
e*e
1 楼
If [a1,a2,a3...,an,b1,b2...bn] is given input change this to [a1,b1,a2,b2...
..an,bn] , solution should be in-place
我能想到的,就是类似于insertion sort的办法,不过是O(n2)的
有没有人能找到O(n)的办法?
..an,bn] , solution should be in-place
我能想到的,就是类似于insertion sort的办法,不过是O(n2)的
有没有人能找到O(n)的办法?