摘要:
Single Number IIIGiven2*n + 2numbers, every numbers occurs twice except two, find them.ExampleGiven[1,2,2,3,4,4,5,3]return1and5ChallengeO(n) time, O(1... 阅读全文
摘要:
Single Number IIGiven3*n + 1numbers, every numbers occurs triple times except one, find it.ExampleGiven[1,1,2,3,3,3,2,2,4,1]return4ChallengeOne-pass, ... 阅读全文
摘要:
Spiral MatrixGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.ExampleGiven the following matrix:[ [ 1,... 阅读全文