标签:blank topic ril string char unique .com previous get
Check out this brilliant solution:
https://discuss.leetcode.com/topic/70658/concise-java-solution-using-dp
My first solution was a O(n^2) typical DP boiler-plate code. The key is, that solution is too generalized. With given char as the ending char in such a string, its previous chars are the same.
LeetCode "467. Unique Substrings in Wraparound String" !!
标签:blank topic ril string char unique .com previous get
原文地址:http://www.cnblogs.com/tonix/p/6354282.html