原创 [LeetCode] 467. Unique Substrings in Wraparound String
題目鏈接: https://leetcode.com/problems/unique-substrings-in-wraparound-string/description/ Description Consider the
原创 [LeetCode] 658. Find K Closest Elements
題目鏈接: https://leetcode.com/problems/find-k-closest-elements/description/ Description Given a sorted array, two in
原创 [算法概論習題] 證明 EXACT 4SAT 是 NP-complete 問題
8.8. In the EXACT 4 SAT problem, the input is a set of clauses, each of which is a disjunction of exactly four literals
原创 [LeetCode] 474. Ones and Zeroes
題目鏈接: https://leetcode.com/problems/ones-and-zeroes/description/ Description In the computer world, use restricted re
原创 [LeetCode] 581. Shortest Unsorted Continuous Subarray
題目鏈接: https://leetcode.com/problems/shortest-unsorted-continuous-subarray/description/ Description Given an integer a
原创 [LeetCode] 540. Single Element in a Sorted Array
題目鏈接: https://leetcode.com/problems/single-element-in-a-sorted-array/description/ Description Given a sorted array co
原创 [LeetCode] 3. Longest Substring Without Repeating Characters
題目鏈接: https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ Description Given a s
原创 [LeetCode] 57. Insert Interval
題目鏈接: https://leetcode.com/problems/insert-interval/description/ Description Given a set of non-overlapping intervals
原创 [LeetCode] 34. Search for a Range
題目鏈接: https://leetcode.com/problems/search-for-a-range/description/ Description Given an array of integers sorted in
原创 [LeetCode] 410. Split Array Largest Sum
題目鏈接: https://leetcode.com/problems/split-array-largest-sum/description/ Description Given an array which consists of
原创 [LeetCode] 207. Course Schedule
題目鏈接: https://leetcode.com/problems/course-schedule/description/ Description There are a total of n courses you have
原创 [LeetCode] 621. Task Scheduler
題目鏈接: https://leetcode.com/problems/task-scheduler/description/ Description Given a char array representing tasks CPU
原创 [Ubuntu] 修改鍵位 — ctrl 和 caps lock 互換
環境 Ubuntu 16.04 步驟 $ sudo vim /usr/share/X11/xkb/keycodes/evdev 搜索 <CAPS> 和 <LCTL>,交換等號後面的數字 ... <CAPS> = 37;
原创 [LeetCode] 25. Reverse Nodes in k-Group
題目鏈接: https://leetcode.com/problems/reverse-nodes-in-k-group/description/ Description Given a linked list, reverse th
原创 [LeetCode] 103. Binary Tree Zigzag Level Order Traversal
題目鏈接: https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/description/ Description Given a binary