原创 [LeetCode] (hard) 140. Word Break II

https://leetcode.com/problems/word-break-ii/ Given a non-empty string s and a dictionary wordDict containing a list of

原创 [LeetCode] (medium) 402. Remove K Digits

https://leetcode.com/problems/remove-k-digits/ Given a non-negative integer num represented as a string, remove k digi

原创 [LeetCode] (medium) 416. Partition Equal Subset Sum

https://leetcode.com/problems/partition-equal-subset-sum/ Given a non-empty array containing only positive integers, f

原创 [LeetCode] (medium) 398. Random Pick Index

https://leetcode.com/problems/random-pick-index/ Given an array of integers with possible duplicates, randomly output

原创 [LeetCode] (medium) 611. Valid Triangle Number

https://leetcode.com/problems/valid-triangle-number/ Given an array consists of non-negative integers, your task is to

原创 [LeetCode] (medium) 522. Longest Uncommon Subsequence II

https://leetcode.com/problems/longest-uncommon-subsequence-ii/ Given a list of strings, you need to find the longest u

原创 [LeetCode] (medium) 688. Knight Probability in Chessboard

https://leetcode.com/problems/knight-probability-in-chessboard/ On an NxN chessboard, a knight starts at the r-th row

原创 [LeetCode] (medium) 673. Number of Longest Increasing Subsequence

https://leetcode.com/problems/number-of-longest-increasing-subsequence/ Given an unsorted array of integers, find the

原创 [LeetCode] (medium) 678. Valid Parenthesis String

https://leetcode.com/problems/valid-parenthesis-string/ Given a string containing only three types of characters: '(',

原创 [LeetCode] (hard) 10. Regular Expression Matching && 44. Wildcard Matching

10. Regular Expression Matching Given an input string (s) and a pattern (p), implement regular expression matching wit

原创 數據壓縮常用算法彙總(思維導圖)

參考:《數據壓縮導論》第2-6章 包括霍夫曼編碼、算術編碼、詞典方法和基於上下文的壓縮  

原创 [LeetCode] (medium) 494. Target Sum

https://leetcode.com/problems/target-sum/ You are given a list of non-negative integers, a1, a2, ..., an, and a target

原创 [LeetCode] (medium) 491. Increasing Subsequences

https://leetcode.com/problems/increasing-subsequences/ Given an integer array, your task is to find all the different

原创 關於知識與情景的抽象

這兩天閱讀了《程序員的思維訓練》和《暗時間》兩書,其中不約而同地提到了抽象這個概念,也就是說我們在學習的過程中將知識抽象,然後在遇到問題的時候將問題抽象,利用抽象出來的這部分去匹配從而實現大腦中“海量數據”的搜索匹配,很多時候我們沒法想到

原创 [LeetCode] (Hard) 685. Redundant Connection II

https://leetcode.com/problems/redundant-connection-ii/ In this problem, a rooted tree is a directed graph such that, t