IncredibleThings

导航

上一页 1 2 3 4 5 6 7 8 9 10 ··· 28 下一页

2020年4月13日 #

LeetCode - Path Sum II

摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. Note: A leaf is a node with no children. Exampl 阅读全文

posted @ 2020-04-13 12:43 IncredibleThings 阅读(173) 评论(0) 推荐(0) 编辑

2020年3月26日 #

LeetCode - Binary Tree Zigzag Level Order Traversal

摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文

posted @ 2020-03-26 09:11 IncredibleThings 阅读(155) 评论(0) 推荐(0) 编辑

2020年3月24日 #

LeetCode - Recover Binary Search Tree

摘要: Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Input: [1,3,null,null,2 阅读全文

posted @ 2020-03-24 09:02 IncredibleThings 阅读(99) 评论(0) 推荐(0) 编辑

2020年1月17日 #

LeetCode - Add Strings

摘要: Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100. Both num1 and num2 contains only digits 0-9. Bot 阅读全文

posted @ 2020-01-17 15:57 IncredibleThings 阅读(73) 评论(0) 推荐(0) 编辑

LeetCode - Kth Largest Element in an Array

摘要: 用 PriorityQueue 阅读全文

posted @ 2020-01-17 15:00 IncredibleThings 阅读(125) 评论(0) 推荐(0) 编辑

2020年1月16日 #

LeetCode - Third Maximum Number

摘要: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n). Example 1: Input: [3, 2, 1] Ou 阅读全文

posted @ 2020-01-16 14:26 IncredibleThings 阅读(110) 评论(0) 推荐(0) 编辑

LeetCode - Fizz Buzz Multithreaded

摘要: Write a program that outputs the string representation of numbers from 1 to n, however: If the number is divisible by 3, output "fizz". If the number is divisible by 5, output "buzz". If the number ... 阅读全文

posted @ 2020-01-16 13:33 IncredibleThings 阅读(374) 评论(0) 推荐(0) 编辑

2020年1月9日 #

LeetCode - Fizz Buzz

摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”. F... 阅读全文

posted @ 2020-01-09 14:44 IncredibleThings 阅读(143) 评论(0) 推荐(0) 编辑

LeetCode - Longest Palindrome

摘要: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This is case sensitive, for example "Aa" is not cons... 阅读全文

posted @ 2020-01-09 14:34 IncredibleThings 阅读(101) 评论(0) 推荐(0) 编辑

2019年10月15日 #

LeetCode-Binary Tree Paths

摘要: 思路:看到题目就知道要用DFS做,注意结束递归的条件 阅读全文

posted @ 2019-10-15 13:06 IncredibleThings 阅读(120) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 28 下一页