原创 LeetCode練習1:Two Sum

題目 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may a

原创 LeetCode練習3:Longest Substring Without Repeating Characters

題目 Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb",

原创 LeetCode練習8:String to Integer (atoi)

題目 Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as n

原创 LeetCode練習10:Regular Expression Matching

題目 Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. ‘.

原创 LeetCode練習9:Palindrome Number

題目 Determine whether an integer is a palindrome. Do this without extra space. Some Hints: Could negative integers be

原创 LeetCode練習2:Add Two Numbers

題目 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse or

原创 LeetCode練習7:Reverse Integer

題目 Given a 32-bit signed integer, reverse digits of an integer. Example: Input: 123,Output: 321 Input: -123,Output

原创 LeetCode練習4:Median of Two Sorted Arrays

題目 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays.

原创 LeetCode練習6:ZigZag Conversion

題目 The string PAYPALISHIRING is written in a zigzag pattern on a given number of rows like this: (you may want to displ

原创 LeetCode練習5:Longest Palindromic Substring

題目 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.

原创 LeetCode練習13:Roman to Integer

題目 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 分析 題目的輸

原创 Python 3 編程BUG總結【不斷更新】

問題1 SyntaxError: invalid character in identifier 可能原因: 存在中文狀態下的括號(),而不是() 代碼的末尾有空格