原创 [LeetCode] Longest Palindromic Substring [14]
題目 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length ofS is 1000, a
原创 [LeetCode] Remove Duplicates from Sorted Array [19]
題目 Given a sorted array, remove the duplicates in place such that each element appear only once and return the new le
原创 [LeetCode] Climbing Stairs [24]
題目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps.
原创 [LeetCode] Binary Tree Preorder Traversal [40]
題目 Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}
原创 [LeetCode] Flatten Binary Tree to Linked List [39]
題目 Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5
原创 [LeetCode] Palindrome Partitioning II [12]
題目 Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts
原创 [LeetCode] String to Integer (atoi) [7]
題目 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want
原创 [ LeetCode ] Longest Common Prefix [5]
題目 Write a function to find the longest common prefix string amongst an array of strings. 原題鏈接 解題思想 給一個字符串數組,求這些字符串的最長公
原创 [LeetCode] Search Insert Position [21]
題目 Given a sorted array and a target value, return the index if the target is found. If not, return the index where i
原创 [LeetCode] Remove Element [20]
題目 Given an array and a value, remove all instances of that value in place and return the new length. The order of e
原创 [LeetCode] Valid Palindrome [10]
題目 Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For
原创 [LeetCode] ZigZag Conversion [9]
題目 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to
原创 [LeetCode] Median of Two Sorted Arrays [16]
題目 There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The over
原创 [LeetCode] Palindrome Number [13]
題目 Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: C
原创 [LeetCode] Reverse Integer [8]
題目 Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers.