加载中...
分类详情
简单 分类
766-托普利茨矩阵(Toeplitz Matrix)
原文链接: https://leetcode-cn.com/problems/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-left to bottom-right has the same elements. Example 1: I…
2021-12-03
771-宝石与石头(Jewels and Stones)
原文链接: https://leetcode-cn.com/problems/jewels-and-stones 英文原文You're given strings jewels representing the types of stones that are jewels, and stones representing the stones you have. Each character in stones is a type of stone you have. You want to …
2021-12-03
704-二分查找(Binary Search)
原文链接: https://leetcode-cn.com/problems/binary-search 英文原文Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return …
2021-12-03
796-旋转字符串(Rotate String)
原文链接: https://leetcode-cn.com/problems/rotate-string 英文原文Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost positio…
2021-12-03
819-最常见的单词(Most Common Word)
原文链接: https://leetcode-cn.com/problems/most-common-word 英文原文Given a string paragraph and a string array of the banned words banned, return the most frequent word that is not banned. It is guaranteed there is at least one word that is not banned, and …
2021-12-03
824-山羊拉丁文(Goat Latin)
原文链接: https://leetcode-cn.com/problems/goat-latin 英文原文You are given a string sentence that consist of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the sentence to "Goat Latin" (a made…
2021-12-03
830-较大分组的位置(Positions of Large Groups)
原文链接: https://leetcode-cn.com/problems/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 s = "abbxxxxzyy" has the groups "a", "bb", "xxxx", "z", a…
2021-12-03
832-翻转图像(Flipping an Image)
原文链接: https://leetcode-cn.com/problems/flipping-an-image 英文原文Given an n x n binary matrix image, flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally means that each row of the image is reversed. …
2021-12-03
836-矩形重叠(Rectangle Overlap)
原文链接: https://leetcode-cn.com/problems/rectangle-overlap 英文原文An axis-aligned rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) is the coordinate of its bottom-left corner, and (x2, y2) is the coordinate of its top-right corner. Its …
2021-12-03
859-亲密字符串(Buddy Strings)
原文链接: https://leetcode-cn.com/problems/buddy-strings 英文原文Given two strings s and goal, return true if you can swap two letters in s so the result is equal to goal, otherwise, return false. Swapping letters is defined as taking two indices i and j (0-…
2021-12-03
860-柠檬水找零(Lemonade Change)
原文链接: https://leetcode-cn.com/problems/lemonade-change 英文原文At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by bills). Each customer will only buy one lemo…
2021-12-03
867-转置矩阵(Transpose Matrix)
原文链接: https://leetcode-cn.com/problems/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 diagonal, switching the matrix's row and column indices. Exampl…
2021-12-03
868-二进制间距(Binary Gap)
原文链接: https://leetcode-cn.com/problems/binary-gap 英文原文Given a positive integer n, find and return the longest distance between any two adjacent 1's in the binary representation of n. If there are no two adjacent 1's, return 0. Two 1's are adjacent if…
2021-12-03