摘要:
Recursion + Memorized Search(DP). And apparently, the code below can be iterative with only 3 vars - DP.class Solution { unordered_map cache;public... 阅读全文
摘要:
LeetCode AC code failed last case with TLE. We need further pruning - we only enumerate all possible lengths of all dict words.class Solution { vec... 阅读全文
摘要:
Something new I learnt from it: what is Treap and a O(n) constructionhttps://en.wikipedia.org/wiki/Cartesian_tree#Efficient_constructionclass Solution... 阅读全文