加载中...
分类详情
中等 分类
853-车队(Car Fleet)
原文链接: https://leetcode-cn.com/problems/car-fleet 英文原文There are n cars going to the same destination along a one-lane road. The destination is target miles away. You are given two integer array position and speed, both of length n, where position[i] i…
2021-12-03
855-考场就座(Exam Room)
原文链接: https://leetcode-cn.com/problems/exam-room 英文原文There is an exam room with n seats in a single row labeled from 0 to n - 1. When a student enters the room, they must sit in the seat that maximizes the distance to the closest person. If there are…
2021-12-03
856-括号的分数(Score of Parentheses)
原文链接: https://leetcode-cn.com/problems/score-of-parentheses 英文原文Given a balanced parentheses string s, return the score of the string. The score of a balanced parentheses string is based on the following rule: "()" has score 1. AB has score A + B, wh…
2021-12-03
858-镜面反射(Mirror Reflection)
原文链接: https://leetcode-cn.com/problems/mirror-reflection 英文原文There is a special square room with mirrors on each of the four walls. Except for the southwest corner, there are receptors on each of the remaining corners, numbered 0, 1, and 2. The squar…
2021-12-03
866-回文素数(Prime Palindrome)
原文链接: https://leetcode-cn.com/problems/prime-palindrome 英文原文Given an integer n, return the smallest prime palindrome greater than or equal to n. An integer is prime if it has exactly two divisors: 1 and itself. Note that 1 is not a prime number. For …
2021-12-03
870-优势洗牌(Advantage Shuffle)
原文链接: https://leetcode-cn.com/problems/advantage-shuffle 英文原文You are given two integer arrays nums1 and nums2 both of the same length. The advantage of nums1 with respect to nums2 is the number of indices i for which nums1[i] > nums2[i]. Return any p…
2021-12-03
877-石子游戏(Stone Game)
原文链接: https://leetcode-cn.com/problems/stone-game 英文原文Alice and Bob play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i]. The objective of the game is to…
2021-12-03
881-救生艇(Boats to Save People)
原文链接: https://leetcode-cn.com/problems/boats-to-save-people 英文原文You are given an array people where people[i] is the weight of the ith person, and an infinite number of boats where each boat can carry a maximum weight of limit. Each boat carries at m…
2021-12-03
900-RLE 迭代器(RLE Iterator)
原文链接: https://leetcode-cn.com/problems/rle-iterator 英文原文We can use run-length encoding (i.e., RLE) to encode a sequence of integers. In a run-length encoded array of even length encoding (0-indexed), for all even i, encoding[i] tells us the number of…
2021-12-03