liangsiyang18
BAN USER
Comments (8)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
I think the complexity is O(n+m). Your solution is the most efficient.
- liangsiyang18 February 27, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
Great Solution
- liangsiyang18 February 27, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
Can somebody give a solution in O(n)? Which means sorting is not allowed.
- liangsiyang18 February 09, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
So it's still O(nlogn) for the problem, right?
- liangsiyang18 February 09, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
max heap is another O(nlogn) solution
- liangsiyang18 February 09, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
Try:[ 4 2 1 7 3 5 6 ]
- liangsiyang18 February 09, 2015Comment hidden because of low score. Click to expand.
0
of 0 vote
Why? Just Sort the array in O(nlogn). An ascending array is still Pointy as the question described.
- liangsiyang18 February 07, 2015Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
By using binary search to get a row's first 1, Is it time complexity come to O(m+logn)
- liangsiyang18 February 27, 2015