原创 LeetCode--No.3--Longest Substring Without Repeating Characters

Given a string, find the length of the longest substringwithout repeating characters. Example 1: Input: "abcabcbb" Out

原创 LeetCode--No.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. Exa

原创 LeetCode -- 904 -- Fruit into Baskets

又刷起來啦。 不打算貼具體的實現了。 但還是寫一下心得吧。 LeetCode 904 Fruit into Baskets 題號大的題,果然比較新,變化多端。還是消化了一下,才能夠把題目抽象出來。 總之是說,給一個數組,找出最多連續多少個

原创 碎碎念

我覺得一個問題搞不定的時候 一定要記得仔細讀代碼,不要放過每一個細節。細節裏面就能說明問題。 有些想不明白的問題,不太可能是電腦出錯了。尤其是,關於電腦是否出錯的情況已經進行過驗證的前提下。 那麼從現有的代碼裏,就可以獲得一些信息去解決。

原创 很久沒來了

很久沒來了,有一年那麼久。2017年後來情緒抑鬱,就放縱自己不再刷題了。2018年因爲CSDN需要手機號綁定,而我的號又剛剛好被註銷,所以刷過的題就沒有再記錄上來。再後來就專心準備找工作,雖然過程很虐心,但也還算幸運。 然而好運不會總是光

原创 LeetCode--No.56--Merge Intervals

Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], retu

原创 LeetCode--No.74--Search a 2D Matrix

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:

原创 LeetCode--No.67--Add Binary

Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". Sub

原创 分界線?

好久沒登了。今天偶然發現了一個小粉絲,還有訪問量居然四位數了,覺得很是神奇。 都是去年暑假時候刷的easy題了,記得當時刷的吭哧癟肚的。後來開學了,忙到哭,又急着找實習。 後來就神奇地以及萬分幸運地找到了

原创 懺悔

說好的4月之前刷完Array呢。 我又放縱了半個月沒刷題。。。 我受不了自己了T.T 我要譴責一下自己。 這星期我要刷完Array然後吃小肥羊的火鍋!

原创 LeetCode--No.78--Subsets

Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplic

原创 LeetCode--No.62--Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only m

原创 LeetCode--No.80--Remove Duplicates from Sorted Array II

Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array nums

原创 LeetCode--No.75--Sort Colors

Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, wi

原创 LeetCode--No.63--Unique Paths II

Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would ther