C++
LeetCode: 316-Remove Duplicate Letters 解題紀錄
題目
Given a string s
, remove duplicate letters so that every letter appears once and only once. You must make sure your result is the smallest in lexicographical order among all possible results.
LeetCode: 856-Score of Parentheses 解題紀錄
題目
Given a balanced parentheses string s
, return the score of the string.
LeetCode: 82-Remove Duplicates from Sorted List II 解題紀錄
題目
Given the head
of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the linked list sorted as well.
Read More »LeetCode: 82-Remove Duplicates from Sorted List II 解題紀錄LeetCode: 383-Counting Bits 解題紀錄
題目
Given an integerRead More »LeetCode: 383-Counting Bits 解題紀錄n
, return an arrayans
of lengthn + 1
such that for eachi
(0 <= i <= n
),ans[i]
is the number of1
's in the binary representation ofi
.