原创 #10 Regular Expression Match

題目鏈接:https://leetcode.com/problems/regular-expression-matching/ Implement regular expression matching with support f

原创 #20 Valid Parentheses

題目鏈接:https://leetcode.com/problems/valid-parentheses/ Given a string containing just the characters '(', ')','{', '}

原创 #12 Integer to Roman

題目鏈接:https://leetcode.com/problems/integer-to-roman/ Given an integer, convert it to a roman numeral. Input is guar

原创 #13 Roman to Integer

題目鏈接:https://leetcode.com/problems/roman-to-integer/ Given a roman numeral, convert it to an integer. Input is guar

原创 #26 Remove Duplicates from Sorted Array

題目鏈接:https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Given a sorted array, remove the duplicates

原创 05-圖3. 六度空間 (30)

05-圖3. 六度空間 (30) 時間限制 1500 ms 內存限制 65536 kB 代碼長度限制 8000 B 判題程序 Standard “六度空間”理論又稱作“六度分隔(Six Degre

原创 04-樹5. File Transfer (25)

04-樹5. File Transfer (25) 時間限制 150 ms 內存限制 65536 kB 代碼長度限制 8000 B 判題程序 Standard 作者 CHEN, Yue We

原创 03-樹3. Tree Traversals Again (25)

03-樹3. Tree Traversals Again (25) 時間限制 200 ms 內存限制 65536 kB 代碼長度限制 8000 B 判題程序 Standard 作者 CHEN, Yu

原创 字符串的包含

題目描述  給定一個字符串a和一短字符串b,只包含小寫字母,判斷b中元素是否都在a中? a是”abcd”,b是”bad”,答案是true a是”abcd”,b是”bce”,答案是false a是”abcd”,b是”aa”,答案是true

原创 04-樹8. Complete Binary Search Tree (30)

04-樹8. Complete Binary Search Tree (30) 時間限制 100 ms 內存限制 65536 kB 代碼長度限制 8000 B 判題程序 Standard 作者 CH

原创 字符串的全排列

題目描述  輸入一個字符串,打印出該字符串中字符的全排列。 解法一:遞歸實現  從未打印字符中選擇一個打印,遞歸打印剩餘字符。 具體實現:將要打印的字符移動到剩餘字符串的頭部,遞歸至沒有剩餘字符時一起全部打印。 C++代碼: void

原创 字符串的旋轉

題目描述 給定一個字符串,要求將字符串的前若干(m)位字符移動到字符串的尾部。 **例如**:將字符串"abcdef"的前3個字符'a'、'b'和'c'移到字符串的尾部,得到"defabc"。 解法一: n輪移動,每輪中將每個字符左移一

原创 04-樹7. Search in a Binary Search Tree (25)

04-樹7. Search in a Binary Search Tree (25) 時間限制 100 ms 內存限制 65536 kB 代碼長度限制 8000 B 判題程序 Standard 作者

原创 05-圖2. Saving James Bond - Easy Version (25)

05-圖2. Saving James Bond - Easy Version (25) 時間限制 200 ms 內存限制 65536 kB 代碼長度限制 8000 B 判題程序 Standard 作

原创 04-樹6. Huffman Codes (30)

04-樹6. Huffman Codes (30) 時間限制 200 ms 內存限制 65536 kB 代碼長度限制 8000 B 判題程序 Standard 作者 CHEN, Yue In