摘要:
A variation to a classical DP: LCS.class Solution {public: /** * @param A an integer array * @return A list of integers includes the index o... 阅读全文
摘要:
It can be solved based on the code from "Strobogrammatic Number II". The idea is pretty straight forward - binary search the boundaries.class Solution... 阅读全文
摘要:
This is abouthttps://en.wikipedia.org/wiki/Run-length_encoding. The trick is, for a valid char, we only compress up to 254 occurences - count 255 mean... 阅读全文