上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 64 下一页
摘要: Given the root of a binary tree, turn the tree upside down and return the new root. You can turn a binary tree upside down with the following steps: T 阅读全文
posted @ 2020-05-01 12:39 CNoodle 阅读(283) 评论(0) 推荐(0)
摘要: A valid IP address consists of exactly four integers separated by single dots. Each integer is between 0 and 255 (inclusive) and cannot have leading z 阅读全文
posted @ 2020-05-01 12:02 CNoodle 阅读(468) 评论(0) 推荐(0)
摘要: Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to positi 阅读全文
posted @ 2020-05-01 08:23 CNoodle 阅读(499) 评论(0) 推荐(0)
摘要: Given a string s, return true if the s can be palindrome after deleting at most one character from it. Example 1: Input: s = "aba" Output: true Exampl 阅读全文
posted @ 2020-05-01 05:52 CNoodle 阅读(185) 评论(0) 推荐(0)
摘要: Given a binary tree where each path going from the root to any leaf form a valid sequence, check if a given string is a valid sequence in such binary 阅读全文
posted @ 2020-05-01 04:21 CNoodle 阅读(660) 评论(0) 推荐(0)
摘要: Given two integers a and b, return the sum of the two integers without using the operators + and -. Example 1: Input: a = 1, b = 2 Output: 3 Example 2 阅读全文
posted @ 2020-04-30 12:44 CNoodle 阅读(170) 评论(0) 推荐(0)
摘要: You have a queue of integers, you need to retrieve the first unique integer in the queue. Implement the FirstUnique class: FirstUnique(int[] nums) Ini 阅读全文
posted @ 2020-04-30 07:31 CNoodle 阅读(1538) 评论(0) 推荐(0)
摘要: (This problem is an interactive problem.) You may recall that an array arr is a mountain array if and only if: arr.length >= 3 There exists some i wit 阅读全文
posted @ 2020-04-29 08:54 CNoodle 阅读(248) 评论(0) 推荐(0)
摘要: Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists 阅读全文
posted @ 2020-04-29 08:43 CNoodle 阅读(185) 评论(0) 推荐(0)
摘要: Let's call an array arr a mountain if the following properties hold: arr.length >= 3 There exists some i with 0 < i < arr.length - 1 such that: arr[0] 阅读全文
posted @ 2020-04-29 04:29 CNoodle 阅读(178) 评论(0) 推荐(0)
摘要: Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example 1: Input: matrix = [["1 阅读全文
posted @ 2020-04-28 13:41 CNoodle 阅读(255) 评论(0) 推荐(0)
摘要: Given an integer array nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements tha 阅读全文
posted @ 2020-04-28 12:43 CNoodle 阅读(162) 评论(0) 推荐(0)
摘要: Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array. A k-diff pair is an integer pair (nums[i], nu 阅读全文
posted @ 2020-04-27 06:44 CNoodle 阅读(209) 评论(0) 推荐(0)
摘要: Given alphanumeric string s. (Alphanumeric string is a string consisting of lowercase English letters and digits). You have to find a permutation of t 阅读全文
posted @ 2020-04-26 16:24 CNoodle 阅读(406) 评论(0) 推荐(0)
摘要: You are given an array of CPU tasks, each represented by letters A to Z, and a cooling time, n. Each cycle or interval allows the completion of one ta 阅读全文
posted @ 2020-04-26 13:16 CNoodle 阅读(441) 评论(0) 推荐(0)
摘要: Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that: 0 <= i, j, k, l < n nums 阅读全文
posted @ 2020-04-26 07:30 CNoodle 阅读(136) 评论(0) 推荐(0)
摘要: Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d < n a 阅读全文
posted @ 2020-04-26 05:37 CNoodle 阅读(488) 评论(0) 推荐(0)
摘要: Given a non-negative integer represented as a linked list of digits, plus one to the integer. The digits are stored such that the most significant dig 阅读全文
posted @ 2020-04-25 06:09 CNoodle 阅读(425) 评论(0) 推荐(0)
摘要: Design a data structure that supports all following operations in average O(1) time. insert(val): Inserts an item val to the set if not already presen 阅读全文
posted @ 2020-04-24 06:39 CNoodle 阅读(226) 评论(0) 推荐(0)
摘要: On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0. A move consists of choosing 0 and a 4 阅读全文
posted @ 2020-04-24 02:18 CNoodle 阅读(220) 评论(0) 推荐(0)
上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 64 下一页