摘要: Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and sum the result 阅读全文
posted @ 2020-11-07 00:08 Sheanne 阅读(179) 评论(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-11-06 05:14 Sheanne 阅读(40) 评论(0) 推荐(0)
摘要: Given a list of words, each word consists of English lowercase letters. Let's say word1 is a predecessor of word2 if and only if we can add exactly on 阅读全文
posted @ 2020-11-06 04:59 Sheanne 阅读(46) 评论(0) 推荐(0)
摘要: You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following defin 阅读全文
posted @ 2020-11-06 04:29 Sheanne 阅读(49) 评论(0) 推荐(0)
摘要: We have n chips, where the position of the ith chip is position[i]. We need to move all the chips to the same position. In one step, we can change the 阅读全文
posted @ 2020-11-06 03:25 Sheanne 阅读(141) 评论(0) 推荐(0)
摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 el 阅读全文
posted @ 2020-11-05 05:32 Sheanne 阅读(65) 评论(0) 推荐(0)
摘要: Given n and m which are the dimensions of a matrix initialized by zeros and given an array indices where indices[i] = [ri, ci]. For each pair of [ri, 阅读全文
posted @ 2020-11-05 04:28 Sheanne 阅读(72) 评论(0) 推荐(0)
摘要: A chef has collected data on the satisfaction level of his n dishes. Chef can cook any dish in 1 unit of time. Like-time coefficient of a dish is defi 阅读全文
posted @ 2020-11-05 04:19 Sheanne 阅读(212) 评论(0) 推荐(0)
摘要: Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive). Example 1: Input: low = 3, high = 7 Ou 阅读全文
posted @ 2020-11-05 03:47 Sheanne 阅读(61) 评论(0) 推荐(0)
摘要: A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles i 阅读全文
posted @ 2020-11-05 03:28 Sheanne 阅读(87) 评论(0) 推荐(0)