摘要: Range Sum Query - Immutable Given an integer array nums, handle multiple queries of the following type: Calculate the sum of the elements of nums betw 阅读全文
posted @ 2023-01-13 21:54 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要: Power of Three Given an integer n, return true if it is a power of three. Otherwise, return false. An integer n is a power of three, if there exists a 阅读全文
posted @ 2023-01-13 21:53 iyiluo 阅读(20) 评论(0) 推荐(0)
摘要: Power of Four Given an integer n, return true if it is a power of four. Otherwise, return false. An integer n is a power of four, if there exists an i 阅读全文
posted @ 2023-01-13 21:53 iyiluo 阅读(39) 评论(0) 推荐(0)
摘要: Middle of the Linked List Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the 阅读全文
posted @ 2023-01-13 21:53 iyiluo 阅读(17) 评论(0) 推荐(0)
摘要: Uncommon Words from Two Sentences A sentence is a string of single-space separated words where each word consists only of lowercase letters. A word is 阅读全文
posted @ 2023-01-13 21:52 iyiluo 阅读(18) 评论(0) 推荐(0)
摘要: DI String Match A permutation perm of n + 1 integers of all the integers in the range [0, n] can be represented as a string s of length n where: s[i] 阅读全文
posted @ 2023-01-13 21:52 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要: Find Common Characters Given a string array words, return an array of all characters that show up in all strings within the words (including duplicate 阅读全文
posted @ 2023-01-13 21:51 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要: Set Mismatch You have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers 阅读全文
posted @ 2023-01-13 21:51 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要: Valid Mountain Array Given an array of integers arr, return true if and only if it is a valid mountain array. Recall that arr is a mountain array if a 阅读全文
posted @ 2023-01-13 21:50 iyiluo 阅读(17) 评论(0) 推荐(0)
摘要: Degree of an Array Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of i 阅读全文
posted @ 2023-01-13 21:50 iyiluo 阅读(19) 评论(0) 推荐(0)
摘要: Distribute Candies Alice has n candies, where the ith candy is of type candyType[i]. Alice noticed that she started to gain weight, so she visited a d 阅读全文
posted @ 2023-01-13 21:50 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要: Longest Harmonious Subsequence We define a harmonious array as an array where the difference between its maximum value and its minimum value is exactl 阅读全文
posted @ 2023-01-13 21:49 iyiluo 阅读(19) 评论(0) 推荐(0)
摘要: Range Addition II You are given an m x n matrix M initialized with all 0's and an array of operations ops, where ops[i] = [ai, bi] means M[x][y] shoul 阅读全文
posted @ 2023-01-13 21:49 iyiluo 阅读(20) 评论(0) 推荐(0)
摘要: Can Place Flowers You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent p 阅读全文
posted @ 2023-01-13 21:49 iyiluo 阅读(20) 评论(0) 推荐(0)
摘要: LongestContinuous Increasing Subsequence Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence 阅读全文
posted @ 2023-01-13 21:49 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要: Baseball Game You are keeping the scores for a baseball game with strange rules. At the beginning of the game, you start with an empty record. You are 阅读全文
posted @ 2023-01-13 21:48 iyiluo 阅读(24) 评论(0) 推荐(0)