Google经典题目一问# JobHunting - 待字闺中
Z*Z
1 楼
Given a Data Structure having first n integers and next n chars. A = i1 i2 i
3 ... iN c1 c2 c3 ... cN.Write an in-place algorithm to rearrange the elemen
ts of the array ass A = i1 c1 i2 c2 ... in cn
O(nlgn)的算法我知道。有没有O(n)的算法?
3 ... iN c1 c2 c3 ... cN.Write an in-place algorithm to rearrange the elemen
ts of the array ass A = i1 c1 i2 c2 ... in cn
O(nlgn)的算法我知道。有没有O(n)的算法?