![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
Estelle-vc
一只还在默默学习的小白
展开
-
leetcode笔记 125. Valid Palindrome & 136. Single Number
leetcode刷题18天125. Valid PalindromeGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Note: For the purpose of this problem, we define empty...原创 2019-04-15 21:02:06 · 97 阅读 · 0 评论 -
leetcode笔记 118. Pascal's Triangle & 119. Pascal's Triangle II
leetcode刷题17天118. Pascal’s TriangleExample:Input: 5Output:[[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]代码:class Solution { public List<List<Integer>> generate(int numRows) {...原创 2019-04-12 20:29:51 · 100 阅读 · 0 评论 -
leetcode笔记 100. Same Tree & 101. Symmetric Tree
leetcode刷题14天100. Same TreeGiven two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes ha...原创 2019-04-09 20:03:07 · 139 阅读 · 0 评论 -
leetcode笔记 66. Plus One & 67. Add Binary
leetcode刷题11天66. Plus OneEasy8071425FavoriteShareGiven a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most signifi...原创 2019-04-03 20:41:33 · 78 阅读 · 0 评论 -
leetcode笔记 171. Excel Sheet Column Number & 172. Factorial Trailing Zeroes
leetcode刷题22天171. Excel Sheet Column NumberGiven a column title as appear in an Excel sheet, return its corresponding column number.For example:A -> 1B -> 2C -> 3...Z -> 26AA ->...原创 2019-04-21 00:12:34 · 101 阅读 · 0 评论 -
leecode笔记 141. Linked List Cycle & 155. Min Stack
leetcode刷题19天141. Linked List CycleGiven a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integer pos which represents the position (0-index...原创 2019-04-16 22:00:05 · 103 阅读 · 0 评论 -
leetcode笔记 202. Happy Number & 203. Remove Linked List Elements
leetcode刷题25天202. Happy NumberWrite an algorithm to determine if a number is “happy”.A happy number is a number defined by the following process: Starting with any positive integer, replace the num...原创 2019-04-26 00:07:09 · 98 阅读 · 0 评论 -
leetcode笔记 189. Rotate Array & 190. Reverse Bits
leetcode刷题23天189. Rotate ArrayGiven an array, rotate the array to the right by k steps, where k is non-negative.Example 1:Input: [1,2,3,4,5,6,7] and k = 3Output: [5,6,7,1,2,3,4]Explanation:rota...原创 2019-04-22 01:43:48 · 140 阅读 · 0 评论 -
leetcode笔记 160. Intersection of Two Linked Lists & 167. Two Sum II - Input array is sorted
leetcode刷题20天160. Intersection of Two Linked ListsWrite a program to find the node at which the intersection of two singly linked lists begins.Example 1:Input: intersectVal = 8, listA = [4,1,8,4,5...原创 2019-04-17 22:34:38 · 80 阅读 · 0 评论 -
leetcode笔记 191. Number of 1 Bits & 198. House Robber
leetcode刷题24天191. Number of 1 BitsWrite a function that takes an unsigned integer and return the number of ‘1’ bits it has (also known as the Hamming weight).Example 1:Input: 000000000000000000000...原创 2019-04-22 23:17:10 · 94 阅读 · 0 评论 -
leetcode笔记 168. Excel Sheet Column Title & 169. Majority Element
leetcode刷题21天168. Excel Sheet Column TitleGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example:1 -> A2 -> B3 -> C...26 -> Z27 -&...原创 2019-04-18 22:38:31 · 98 阅读 · 0 评论 -
leetcode笔记 53. Maximum Subarray & 58. Length of Last Word
leetcode刷题10天53. Maximum SubarrayGiven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-...原创 2019-04-02 23:14:20 · 72 阅读 · 0 评论 -
leetcode笔记 111. Minimum Depth of Binary Tree & 112. Path Sum
leetcode刷题16天111. Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest lea...原创 2019-04-11 15:34:52 · 78 阅读 · 0 评论 -
leetcode笔记 21. Merge Two Sorted Lists
leetcode刷题第六天!21. Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: ...原创 2019-03-28 10:51:27 · 57 阅读 · 0 评论 -
leetcode笔记 9. Palindrome Number
leetcode刷题第二天9. Palindrome NumberExample 1:Input: 121Output: trueExample 2:Input: -121Output: falseExplanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefor...原创 2019-03-24 23:59:52 · 150 阅读 · 2 评论 -
leetcode笔记 13. Roman to Integer
leetcode刷题第三天!13. Roman to IntegerRoman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L ...原创 2019-03-25 18:56:15 · 87 阅读 · 0 评论 -
leetcode笔记 26. Remove Duplicates from Sorted Array
leetcode刷题第七天26. Remove Duplicates from Sorted ArrayGiven a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra...原创 2019-03-29 23:17:33 · 68 阅读 · 0 评论 -
leetcode笔记 27. Remove Element
leetcode刷题第8天27. Remove ElementGiven an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do ...原创 2019-03-30 00:27:47 · 68 阅读 · 0 评论 -
leetcode笔记 14. Longest Common Prefix
leetcode刷题第四天14. Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input...原创 2019-03-26 15:15:28 · 75 阅读 · 0 评论 -
leetcode笔记 7. Reverse Integer
leetcode 刷题第二天7. Reverse Integer*Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21主...原创 2019-03-23 14:31:55 · 70 阅读 · 0 评论 -
leetcode笔记 69. Sqrt(x) & 70. Climbing Stairs
leetcode刷题12天69. Sqrt(x)Implement int sqrt(int x).Compute and return the square root of x, where x is guaranteed to be a non-negative integer.Since the return type is an integer, the decimal digit...原创 2019-04-05 00:42:03 · 71 阅读 · 0 评论 -
leetcode笔记 28. Implement strStr() & 35. Search Insert Position & 38. Count and Say
leetcode刷题9天28. Implement strStr()Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = “hello”, n...原创 2019-04-01 00:35:55 · 76 阅读 · 0 评论 -
leetcode笔记 20. Valid Parentheses
leetcode刷题第五天20. Valid ParenthesesGiven a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.An input string is valid if:Open brackets mu...原创 2019-03-27 19:51:10 · 74 阅读 · 0 评论 -
leetcode笔记 107. Binary Tree Level Order Traversal II&108. Convert Sorted Array to Binary Search Tree
leetcode刷题15天107. Binary Tree Level Order Traversal IIGiven a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root)...原创 2019-04-10 19:46:15 · 80 阅读 · 0 评论 -
leetcode笔记 83. Remove Duplicates from Sorted List & 88. Merge Sorted Array
leetcode刷题13天83. Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear only once.Example 1:Input: 1->1->2Output: 1->2Example ...原创 2019-04-06 22:47:10 · 94 阅读 · 0 评论 -
leetcode笔记 2. Add Two Numbers & 3. Longest Substring Without Repeating Characters
之前太忙了。。。断更了N天。。。继续刷题leetcode刷题26天You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digi...原创 2019-06-10 15:08:15 · 86 阅读 · 0 评论