上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 64 下一页
摘要: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Example 1: Input: nums = [3,2,3] Output: [3] Example 2: Input 阅读全文
posted @ 2020-09-23 15:07 CNoodle 阅读(183) 评论(0) 推荐(0)
摘要: You are given the root of a binary tree with n nodes where each node in the tree has node.val coins. There are n coins in total throughout the whole t 阅读全文
posted @ 2020-09-22 14:59 CNoodle 阅读(204) 评论(0) 推荐(0)
摘要: Given the root of 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 阅读全文
posted @ 2020-09-21 13:23 CNoodle 阅读(235) 评论(0) 推荐(0)
摘要: You are given an array prices where prices[i] is the price of a given stock on the ith day, and an integer fee representing a transaction fee. Find th 阅读全文
posted @ 2020-09-21 11:39 CNoodle 阅读(172) 评论(0) 推荐(0)
摘要: You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. You may complete 阅读全文
posted @ 2020-09-21 05:48 CNoodle 阅读(391) 评论(0) 推荐(0)
摘要: An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers 阅读全文
posted @ 2020-09-20 10:43 CNoodle 阅读(484) 评论(0) 推荐(0)
摘要: You are given an integer array prices where prices[i] is the price of a given stock on the ith day, and an integer k. Find the maximum profit you can 阅读全文
posted @ 2020-09-20 06:41 CNoodle 阅读(365) 评论(0) 推荐(0)
摘要: You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. You may complete  阅读全文
posted @ 2020-09-20 03:48 CNoodle 阅读(514) 评论(0) 推荐(0)
摘要: Given an integer array nums, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array wil 阅读全文
posted @ 2020-09-19 07:40 CNoodle 阅读(223) 评论(0) 推荐(0)
摘要: On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions: "G": go straight 1 unit; "L 阅读全文
posted @ 2020-09-18 07:29 CNoodle 阅读(282) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, each node in the tree has a distinct value. After deleting all nodes with a value in to_delete, we are left with a fo 阅读全文
posted @ 2020-09-17 15:02 CNoodle 阅读(206) 评论(0) 推荐(0)
摘要: Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n. Example 1: Input: nums = [3,10,5,25,2,8] Output: 阅读全文
posted @ 2020-09-17 13:12 CNoodle 阅读(265) 评论(0) 推荐(0)
摘要: There are n flights that are labeled from 1 to n. You are given an array of flight bookings bookings, where bookings[i] = [firsti, lasti, seatsi] repr 阅读全文
posted @ 2020-09-17 08:08 CNoodle 阅读(368) 评论(0) 推荐(0)
摘要: Given a positive integer N, how many ways can we write it as a sum of consecutive positive integers? Example 1: Input: 5 Output: 2 Explanation: 5 = 5 阅读全文
posted @ 2020-09-13 10:39 CNoodle 阅读(217) 评论(0) 推荐(0)
摘要: Given a node in a binary search tree, find the in-order successor of that node in the BST. If that node has no in-order successor, return null. The su 阅读全文
posted @ 2020-09-12 15:45 CNoodle 阅读(241) 评论(0) 推荐(0)
摘要: Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Input: [1,2,3] Output: 6 Example 2: Inp 阅读全文
posted @ 2020-09-12 06:40 CNoodle 阅读(210) 评论(0) 推荐(0)
摘要: You are playing the Bulls and Cows game with your friend. You write down a secret number and ask your friend to guess what the number is. When your fr 阅读全文
posted @ 2020-09-11 02:10 CNoodle 阅读(331) 评论(0) 推荐(0)
摘要: Given a root of an N-ary tree, return a deep copy (clone) of the tree. Each node in the n-ary tree contains a val (int) and a list (List[Node]) of its 阅读全文
posted @ 2020-09-10 05:47 CNoodle 阅读(553) 评论(0) 推荐(0)
摘要: Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target. The answer is  阅读全文
posted @ 2020-09-10 04:17 CNoodle 阅读(231) 评论(0) 推荐(0)
摘要: A conveyor belt has packages that must be shipped from one port to another within days days. The ith package on the conveyor belt has a weight of weig 阅读全文
posted @ 2020-09-09 14:27 CNoodle 阅读(270) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 64 下一页