摘要:
This problem has three kinds of situations: 1. [0,0,1,1,1,] -> 0s start from i=0, the plant count = zeroNumber/2. 2.[1,0,0,0,1] -> 0s are in between 1 阅读全文
摘要:
My PriorityQueue solution, the time complexity is O(n+klog(k)) = O(nlog(n)). class IndexDistance{ int index; int distance; public IndexDistance(int a, 阅读全文