上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 64 下一页
摘要: A parentheses string is valid if and only if: It is the empty string, It can be written as AB (A concatenated with B), where A and B are valid strings 阅读全文
posted @ 2020-12-18 08:39 CNoodle 阅读(122) 评论(0) 推荐(0)
摘要: Given a parentheses string s containing only the characters '(' and ')'. A parentheses string is balanced if: Any left parenthesis '(' must have a cor 阅读全文
posted @ 2020-12-18 08:10 CNoodle 阅读(554) 评论(0) 推荐(0)
摘要: Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. (Recall that an integer has m 阅读全文
posted @ 2020-12-16 06:00 CNoodle 阅读(167) 评论(0) 推荐(0)
摘要: You are given two linked lists: list1 and list2 of sizes n and m respectively. Remove list1's nodes from the ath node to the bth node, and put list2 i 阅读全文
posted @ 2020-12-15 01:17 CNoodle 阅读(192) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, the depth of each node is the shortest distance to the root. Return the smallest subtree such that it contains all th 阅读全文
posted @ 2020-12-13 14:30 CNoodle 阅读(248) 评论(0) 推荐(0)
摘要: A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The 阅读全文
posted @ 2020-12-13 10:29 CNoodle 阅读(469) 评论(0) 推荐(0)
摘要: Let's define a function f(s) over a non-empty string s, which calculates the frequency of the smallest character in s. For example, if s = "dcce" then 阅读全文
posted @ 2020-12-13 09:12 CNoodle 阅读(239) 评论(0) 推荐(0)
摘要: Design a stack which supports the following operations. Implement the CustomStack class: CustomStack(int maxSize) Initializes the object with maxSize  阅读全文
posted @ 2020-12-11 14:33 CNoodle 阅读(248) 评论(0) 推荐(0)
摘要: A binary tree is named Even-Odd if it meets the following conditions: The root of the binary tree is at level index 0, its children are at level index 阅读全文
posted @ 2020-12-10 04:39 CNoodle 阅读(278) 评论(0) 推荐(0)
摘要: You have a binary tree with a small defect. There is exactly one invalid node where its right child incorrectly points to another node at the same dep 阅读全文
posted @ 2020-12-05 10:36 CNoodle 阅读(502) 评论(0) 推荐(0)
摘要: Given two positive integers n and k. A factor of an integer n is defined as an integer i where n % i == 0. Consider a list of all factors of n sorted 阅读全文
posted @ 2020-12-05 07:22 CNoodle 阅读(330) 评论(0) 推荐(0)
摘要: Given a binary tree where every node has a unique value, and a target key k, find the value of the nearest leaf node to target k in the tree. Here, ne 阅读全文
posted @ 2020-12-05 00:27 CNoodle 阅读(219) 评论(0) 推荐(0)
摘要: Given an array nums sorted in ascending order, return true if and only if you can split it into 1 or more subsequences such that each subsequence cons 阅读全文
posted @ 2020-12-04 11:52 CNoodle 阅读(214) 评论(0) 推荐(0)
摘要: Given the root of a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every no 阅读全文
posted @ 2020-12-04 01:07 CNoodle 阅读(102) 评论(0) 推荐(0)
摘要: Convert a Binary Search Tree to a sorted Circular Doubly-Linked List in place. You can think of the left and right pointers as synonymous to the prede 阅读全文
posted @ 2020-12-03 06:50 CNoodle 阅读(240) 评论(0) 推荐(0)
摘要: Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being chosen. Follow up:Wha 阅读全文
posted @ 2020-12-03 02:10 CNoodle 阅读(76) 评论(0) 推荐(0)
摘要: Given a binary tree root and an integer target, delete all the leaf nodes with value target. Note that once you delete a leaf node with value target, 阅读全文
posted @ 2020-12-02 02:52 CNoodle 阅读(258) 评论(0) 推荐(0)
摘要: We are given the head node root of a binary tree, where additionally every node's value is either a 0 or a 1. Return the same tree where every subtree 阅读全文
posted @ 2020-12-02 02:23 CNoodle 阅读(72) 评论(0) 推荐(0)
摘要: You are given a list of songs where the ith song has a duration of time[i] seconds. Return the number of pairs of songs for which their total duration 阅读全文
posted @ 2020-11-28 05:05 CNoodle 阅读(116) 评论(0) 推荐(0)
摘要: Given a string s and an integer k, return the length of the longest substring of s such that the frequency of each character in this substring is grea 阅读全文
posted @ 2020-11-27 17:19 CNoodle 阅读(393) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 64 下一页