上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 64 下一页
摘要: Given the root of a binary tree, return the number of uni-value subtrees. A uni-value subtree means all nodes of the subtree have the same value. Exam 阅读全文
posted @ 2020-03-13 01:42 CNoodle 阅读(327) 评论(0) 推荐(0)
摘要: Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and 阅读全文
posted @ 2020-03-12 13:38 CNoodle 阅读(237) 评论(0) 推荐(0)
摘要: There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i 阅读全文
posted @ 2020-03-12 11:14 CNoodle 阅读(221) 评论(0) 推荐(0)
摘要: There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i 阅读全文
posted @ 2020-03-12 09:45 CNoodle 阅读(260) 评论(0) 推荐(0)
摘要: Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文
posted @ 2020-03-12 07:20 CNoodle 阅读(218) 评论(0) 推荐(0)
摘要: Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1. Sort the elements of arr1 such that the 阅读全文
posted @ 2020-03-11 14:28 CNoodle 阅读(158) 评论(0) 推荐(0)
摘要: Given an array A of integers, return true if and only if we can partition the array into three non-empty parts with equal sums. Formally, we can parti 阅读全文
posted @ 2020-03-11 12:41 CNoodle 阅读(192) 评论(0) 推荐(0)
摘要: Implement the BSTIterator class that represents an iterator over the in-order traversal of a binary search tree (BST): BSTIterator(TreeNode root) Init 阅读全文
posted @ 2020-03-11 08:23 CNoodle 阅读(478) 评论(0) 推荐(0)
摘要: A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are va 阅读全文
posted @ 2020-03-11 05:56 CNoodle 阅读(219) 评论(0) 推荐(0)
摘要: Design a data structure that supports adding new words and finding if a string matches any previously added string. Implement the WordDictionary class 阅读全文
posted @ 2020-03-11 05:36 CNoodle 阅读(316) 评论(0) 推荐(0)
摘要: Serialization is converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted acr 阅读全文
posted @ 2020-03-11 02:16 CNoodle 阅读(242) 评论(0) 推荐(0)
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2020-03-10 15:42 CNoodle 阅读(259) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2020-03-10 14:36 CNoodle 阅读(169) 评论(0) 推荐(0)
摘要: You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You ca 阅读全文
posted @ 2020-03-10 13:45 CNoodle 阅读(380) 评论(0) 推荐(0)
摘要: The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of th 阅读全文
posted @ 2020-03-10 07:06 CNoodle 阅读(358) 评论(0) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2020-03-10 04:39 CNoodle 阅读(249) 评论(0) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2020-03-10 03:54 CNoodle 阅读(249) 评论(0) 推荐(0)
摘要: 旋转字符串。题意是给两个字符串A和B,请判断B是否是经由A旋转过若干次而得到的。例子, Example 1: Input: A = 'abcde', B = 'cdeab' Output: true Example 2: Input: A = 'abcde', B = 'abced' Output: 阅读全文
posted @ 2020-03-09 14:39 CNoodle 阅读(272) 评论(0) 推荐(0)
摘要: This is an interactive problem. You have a sorted array of unique elements and an unknown size. You do not have an access to the array but you can use 阅读全文
posted @ 2020-03-08 15:40 CNoodle 阅读(847) 评论(0) 推荐(0)
摘要: Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1 阅读全文
posted @ 2020-03-08 03:58 CNoodle 阅读(304) 评论(0) 推荐(0)
上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 64 下一页