摘要:
First I wrote a bruteforce solution, but it didn't pass because of too many calls, the time complexity is O(m*n): public int leftMostColumnWithOne(Bin 阅读全文
摘要:
This problem can be solved by sliding window: 1. firstly the right point, j, start to move, if it meet a zero, the zeroNum++, which means, we convert 阅读全文
摘要:
This is the typical DP problem, the time complexity is O(n2), Where n is the length of string s. This is due to the fact that we try to find result fo 阅读全文