随笔分类 -  leetcode

上一页 1 2 3 4 5 6 ··· 15 下一页
摘要:Minimum Cost to Move Chips to The Same Position We have n chips, where the position of the ith chip is position[i]. We need to move all the chips to t 阅读全文
posted @ 2023-05-18 20:24 iyiluo 阅读(19) 评论(0) 推荐(0)
摘要:Unique Number of Occurences Given an array of integers arr, return true if the number of occurrences of each value in the array is unique or false oth 阅读全文
posted @ 2023-05-18 20:24 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Find Words That Can Be Formed by Characters You are given an array of strings words and a string chars. A string is good if it can be formed by charac 阅读全文
posted @ 2023-05-18 20:24 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要:Sort Array By Parity II Given an array of integers nums, half of the integers in nums are odd, and the other half are even. Sort the array so that whe 阅读全文
posted @ 2023-05-18 20:23 iyiluo 阅读(15) 评论(0) 推荐(0)
摘要:Sort Array By Parity Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integers. Return an 阅读全文
posted @ 2023-05-18 20:23 iyiluo 阅读(14) 评论(0) 推荐(0)
摘要:Distance Between Bus Stops A bus has n stops numbered from 0 to n - 1 that form a circle. We know the distance between all pairs of neighboring stops 阅读全文
posted @ 2023-05-18 20:23 iyiluo 阅读(25) 评论(0) 推荐(0)
摘要:Delete Columns To Make Sorted You are given an array of n strings strs, all of the same length. The strings can be arranged such that there is one on 阅读全文
posted @ 2023-04-14 22:18 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Transpose Matrix Given a 2D integer array matrix, return the transpose of matrix. The transpose of a matrix is the matrix flipped over its main diagon 阅读全文
posted @ 2023-04-14 22:18 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要:Backspace String Compare Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace c 阅读全文
posted @ 2023-04-14 22:18 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Positions of Large Groups In a string s of lowercase letters, these letters form consecutive groups of the same character. For example, a string like 阅读全文
posted @ 2023-04-14 22:18 iyiluo 阅读(29) 评论(0) 推荐(0)
摘要:Largest Triangle Area Given an array of points on the X-Y plane points where points[i] = [xi, yi], return the area of the largest triangle that can be 阅读全文
posted @ 2023-04-14 22:17 iyiluo 阅读(29) 评论(0) 推荐(0)
摘要:Number of Lines To Write String You are given a string s of lowercase English letters and an array widths denoting how many pixels wide each lowercase 阅读全文
posted @ 2023-04-14 22:17 iyiluo 阅读(24) 评论(0) 推荐(0)
摘要:Toeplitz Matrix Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false. A matrix is Toeplitz if every diagonal from top 阅读全文
posted @ 2023-04-14 22:17 iyiluo 阅读(30) 评论(0) 推荐(0)
摘要:Number of Days Between Two Dates Write a program to count the number of days between two dates. The two dates are given as strings, their format is YY 阅读全文
posted @ 2023-04-14 22:16 iyiluo 阅读(17) 评论(0) 推荐(0)
摘要:Number of Steps to Reduce a Number to Zero Given an integer num, return the number of steps to reduce it to zero. In one step, if the current number i 阅读全文
posted @ 2023-04-14 22:16 iyiluo 阅读(28) 评论(0) 推荐(0)
摘要:The K Weakest Rows in a Matrix You are given an m x n binary matrix mat of 1's (representing soldiers) and 0's (representing civilians). The soldiers 阅读全文
posted @ 2023-04-14 22:15 iyiluo 阅读(20) 评论(0) 推荐(0)
摘要:Find Smallest Letter Greater Than Target You are given an array of characters letters that is sorted in non-decreasing order, and a character target. 阅读全文
posted @ 2023-03-31 19:54 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要:Find Pivot Index Given an array of integers nums, calculate the pivot index of this array. The pivot index is the index where the sum of all the numbe 阅读全文
posted @ 2023-03-31 19:54 iyiluo 阅读(37) 评论(0) 推荐(0)
摘要:Prime Number of Set Bits in Binary Representation Given two integers left and right, return the count of numbers in the inclusive range [left, right] 阅读全文
posted @ 2023-03-31 19:53 iyiluo 阅读(22) 评论(0) 推荐(0)
摘要:Maximize Sum Of Array After K Negations Given an integer array nums and an integer k, modify the array in the following way: choose an index i and rep 阅读全文
posted @ 2023-03-31 19:53 iyiluo 阅读(32) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 15 下一页