003.Longest Substring Without Repeating Characters
004.median of two sorted arrays
005.Longest Palindromic Substring
008.String to Integer (atoi)
010. Regular Expression Matching
011. Container With Most Water
014. Longest Common Prefix
017. Letter Combinations of a Phone Number
019. Remove Nth Node From End of List
021. Merge Two Sorted Lists
022. Generate Parentheses
023. Merge k Sorted Lists
025. Reverse Nodes in k-Group
026. Remove Duplicates from Sorted Array
030. Substring with Concatenation of All Words
032. Longest Valid Parentheses
033. Search in Rotated Sorted Array
035. Search Insert Position
041. First Missing Positive
060. Permutation Sequence
076. Minimum Window Substring
080. Remove Duplicates from Sorted Array II
081. Search in Rotated Sorted Array II
082. Remove Duplicates from Sorted List II
083. Remove Duplicates from Sorted List
084. Largest Rectangle in Histogram
092. Reverse Linked List II
093. Restore IP Addresses
094. Binary Tree Inorder Traversal
095. Unique Binary Search Trees II
096. Unique Binary Search Trees
098. Validate Binary Search Tree
102. Binary Tree Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
104. Maximum Depth of Binary Tree
105. Construct Binary Tree from Preorder and Inorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
107. Binary Tree Level Order Traversal II
108. Convert Sorted Array to Binary Search Tree
109. Convert Sorted List to Binary Search Tree
110. Balanced Binary Tree
111. Minimum Depth of Binary Tree
114. Flatten Binary Tree to Linked List
Folders and files Name Name Last commit message
Last commit date
parent directory Dec 12, 2017
Dec 12, 2017
View all files
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
给定两个字符串表示的二进制数,求和。
从末位相加,考虑进位。额外考虑加完后的进位。
string不能直接由char转
可以用下式在字符串到达末尾的情况也可以通用。
c += i >= 0 ? a[i --] - '0' : 0;
You can’t perform that action at this time.