自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(223)
  • 收藏
  • 关注

原创 【社招】【亚马逊】SDEI + SDEII

2019-03-15 14:22:24 1188

原创 292 Nim Game

题目链接:https://leetcode.com/problems/nim-game/题目:You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones.

2016-03-08 21:28:09 585

原创 230 Kth Smallest Element in a BST

题目链接:https://leetcode.com/problems/kth-smallest-element-in-a-bst/题目:Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always val

2016-02-18 14:29:18 732

原创 210 Course Schedule II

题目链接:https://leetcode.com/problems/course-schedule-ii/题目:There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you h

2016-02-17 22:16:42 800

原创 215 Kth Largest Element in an Array

题目链接:https://leetcode.com/problems/kth-largest-element-in-an-array/题目:Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinc

2016-02-16 22:30:20 473

原创 209 Minimum Size Subarray Sum

题目链接:https://leetcode.com/problems/minimum-size-subarray-sum/题目:Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn'

2016-02-16 19:27:22 857

原创 208 Implement Trie (Prefix Tree)

题目链接:https://leetcode.com/problems/implement-trie-prefix-tree/题目:Implement a trie with insert, search, and startsWith methods.Note:You may assume that all inputs are consist of lowercase letters a-z.解

2016-02-16 16:29:45 616

原创 207 Course Schedule

题目链接:https://leetcode.com/problems/course-schedule/题目:There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have

2016-02-13 15:57:44 616

原创 205 Isomorphic Strings

题目链接:https://leetcode.com/problems/isomorphic-strings/题目:Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occur

2016-02-05 22:27:09 428

原创 203 Remove Linked List Elements

题目链接:https://leetcode.com/problems/remove-linked-list-elements/题目:Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Re

2016-02-05 18:58:30 502

原创 201 Bitwise AND of Numbers Range

题目链接:https://leetcode.com/problems/bitwise-and-of-numbers-range/题目:Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.For example, give

2016-02-05 18:33:02 643

原创 200 Number of Islands

题目链接:https://leetcode.com/problems/number-of-islands/题目:Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting ad

2016-02-05 16:28:23 350

原创 199 Binary Tree Right Side View

题目链接:https://leetcode.com/problems/binary-tree-right-side-view/题目:Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to

2016-02-03 22:14:21 377

原创 198 House Robber

题目链接:https://leetcode.com/problems/house-robber/题目:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo

2016-02-03 21:17:04 3070 2

原创 190 Reverse Bits

题目链接:https://leetcode.com/problems/reverse-bits/题目:Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return

2016-02-03 20:39:24 561

原创 189 Rotate Array

题目链接:https://leetcode.com/problems/rotate-array/ 题目:Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Not

2016-02-03 17:31:14 533

原创 123 Best Time to Buy and Sell Stock III

题目链接:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum

2016-02-03 16:20:19 690

原创 188 Best Time to Buy and Sell Stock IV

题目链接:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum p

2016-02-03 16:05:10 675

原创 187 Repeated DNA Sequences

题目链接:https://leetcode.com/problems/repeated-dna-sequences/题目:All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes

2016-02-02 16:31:36 557

原创 191 Number of 1 Bits

题目链接:https://leetcode.com/problems/number-of-1-bits/题目:Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-b

2016-01-31 23:04:10 434

原创 179 Largest Number

题目链接:https://leetcode.com/problems/largest-number/题目:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed

2016-01-31 22:03:04 1273

原创 173 Binary Search Tree Iterator

题目链接:https://leetcode.com/problems/binary-search-tree-iterator/题目:Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() wil

2016-01-31 16:24:23 403

原创 172 Factorial Trailing Zeroes

题目链接:https://leetcode.com/problems/factorial-trailing-zeroes/题目:Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.解题思路: 这题的考点依

2016-01-31 15:35:11 336

原创 171 Excel Sheet Column Number

题目链接:https://leetcode.com/problems/excel-sheet-column-number/题目:Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For

2016-01-30 18:52:49 448

原创 168 Excel Sheet Column Title

题目链接:https://leetcode.com/problems/excel-sheet-column-title/题目:Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C

2016-01-30 16:05:45 470

原创 166 Fraction to Recurring Decimal

题目链接:https://leetcode.com/problems/fraction-to-recurring-decimal/题目:Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional p

2016-01-24 20:29:20 670

原创 165 Compare Version Numbers

题目链接:https://leetcode.com/problems/compare-version-numbers/题目:Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0.Yo

2016-01-24 17:50:42 435

原创 162 Find Peak Element

题目链接:https://leetcode.com/problems/find-peak-element/题目:A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its

2016-01-18 22:00:34 434

原创 154 Find Minimum in Rotated Sorted Array II

题目链接:https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/题目:Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complex

2016-01-17 21:57:27 403

原创 155 Min Stack

题目链接:https://leetcode.com/problems/min-stack/题目:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes t

2016-01-06 21:37:26 546

原创 151 Reverse Words in a String

题目链接:https://leetcode.com/problems/reverse-words-in-a-string/题目:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02

2015-12-29 22:30:24 429

原创 148 Sort List

题目链接:https://leetcode.com/problems/sort-list/题目:Sort a linked list in O(n log n) time using constant space complexity.解题思路: 排序 + O(n log n) = 快速排序,归并排序,堆排序 这道题选用归并排序。 1. 先将链表从中间拆分为两个子链表(用 walker 和 r

2015-12-29 21:36:49 366

原创 145 Binary Tree Postorder Traversal

题目链接:https://leetcode.com/problems/binary-tree-postorder-traversal/题目:Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \

2015-12-29 20:25:49 312

原创 144 Binary Tree Preorder Traversal

题目链接:https://leetcode.com/problems/binary-tree-preorder-traversal/题目:Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2

2015-12-28 20:53:39 331

原创 143 Reorder List

题目链接:https://leetcode.com/problems/reorder-list/题目:Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For

2015-12-28 20:20:16 358

原创 142 Linked List Cycle II

题目链接:https://leetcode.com/problems/linked-list-cycle-ii/题目:Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up:

2015-12-27 21:42:05 432

原创 141 Linked List Cycle

题目链接:https://leetcode.com/problems/linked-list-cycle/

2015-12-24 21:50:51 369

原创 139 Word Break

题目链接:https://leetcode.com/problems/word-break/题目:Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For exa

2015-12-24 21:39:20 415

原创 138 Copy List with Random Pointer

题目链接:https://leetcode.com/problems/copy-list-with-random-pointer/题目:A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Re

2015-12-24 20:25:32 304

原创 131 Palindrome Partitioning

题目链接:https://leetcode.com/problems/palindrome-partitioning/题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.F

2015-12-22 21:51:23 369

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除