Tc的专栏

待重头,收拾旧山河,朝天阙

LeetCode 1025 Divisor Game (博弈)

Alice and Bob take turns playing a game, with Alice starting first. Initially, there is a numberNon the chalkboard. On each player's turn, that play...

2019-05-05 11:01:52

阅读数 55

评论数 0

LeetCode 20 Valid Parentheses (栈)

Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid. An input string is valid if: Open b...

2019-04-27 14:52:59

阅读数 7

评论数 0

LeetCode 53 Maximum Subarray (dp)

Given an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum. Example: In...

2019-04-27 14:41:07

阅读数 20

评论数 0

LeetCode 771 Jewels and Stones (bits)

You're given stringsJrepresenting the types of stones that are jewels, andSrepresenting the stones you have. Each character inSis a type of stone you...

2019-04-27 13:13:18

阅读数 13

评论数 0

LeetCode 1 Two Sum (hash)

Given an array of integers, returnindicesof the two numbers such that they add up to a specific target. You may assume that each input would haveexa...

2019-04-21 14:20:06

阅读数 17

评论数 0

LeetCode 538 Convert BST to Greater Tree (中序遍历 或 反中序遍历 推荐)

Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all...

2019-04-21 14:16:03

阅读数 19

评论数 0

LeetCode 21 Merge Two Sorted Lists (链表)

Merge 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. Exampl...

2019-04-21 13:36:37

阅读数 16

评论数 0

LeetCode 448 Find All Numbers Disappeared in an Array (思维 推荐)

Given an array of integers where 1 ≤ a[i] ≤n(n= size of array), some elements appear twice and others appear once. Find all the elements of [1,n] in...

2019-04-21 13:08:13

阅读数 16

评论数 0

LeetCode 283 Move Zeroes

Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements. Example: Input...

2019-04-21 12:44:08

阅读数 18

评论数 0

LeetCode 461 Hamming Distance (异或)

TheHamming distancebetween two integers is the number of positions at which the corresponding bits are different. Given two integersxandy, calculate...

2019-04-15 22:59:19

阅读数 14

评论数 0

LeetCode 696 Count Binary Substrings (模拟)

Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in t...

2019-02-21 21:48:36

阅读数 21

评论数 0

LeetCode 543 Diameter of Binary Tree (DFS 树的直径)

Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betw...

2019-02-13 09:35:19

阅读数 46

评论数 0

LeetCode 257 Binary Tree Paths (DFS)

LeetCode 257 Binary Tree Paths (DFS)

2017-08-22 13:53:24

阅读数 470

评论数 0

LeetCode 101 Symmetric Tree (DFS)

LeetCode 101 Symmetric Tree (DFS)

2017-08-04 14:09:20

阅读数 490

评论数 0

LeetCode 496 Next Greater Element I

LeetCode 496 Next Greater Element I

2017-07-14 16:55:25

阅读数 399

评论数 0

LeetCode 234 Palindrome Linked List (链表 快慢指针)

LeetCode 234 Palindrome Linked List (链表 快慢指针)

2017-07-13 14:48:13

阅读数 589

评论数 0

LeetCode 189 Rotate Array (思维)

LeetCode 189 Rotate Array (思维)

2017-07-13 13:28:51

阅读数 459

评论数 0

LeetCode 125 Valid Palindrome

LeetCode 125 Valid Palindrome

2017-07-07 17:29:11

阅读数 361

评论数 0

LeetCode 198 House Robber (dp)

LeetCode 198 House Robber (dp)

2017-07-06 12:44:02

阅读数 407

评论数 0

LeetCode 561 Array Partition I

LeetCode 561 Array Partition I

2017-07-04 20:18:07

阅读数 589

评论数 0

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