Design your implementation of the circular queue. The circular queue is a linear data structure in whic…
分类:LeetCode题目解答
[LeetCode] Number of Segments in a String 字符串中的分段数量
Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non…
[LeetCode] Sort Characters By Frequency 根据字符出现频率排序
Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tr…
[LeetCode] Beautiful Arrangement 优美排列
Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that i…
[LeetCode] Next Greater Element III 下一个较大的元素之三
Given a positive 32-bit integer n, you need to find the smallest 32-bit intege…
[LeetCode] Binary Number with Alternating Bits 有交替位的二进制数
Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will alwa…
557. Reverse Words in a String III
Given a string, you need to reverse the order of characters in each word within a sentence while still preserv…
力扣(LeetCode)221
题目地址:https://leetcode-cn.com/probl…题目描述:在一个由 0 和 1 组成的二维矩阵内,找到只包含 1 的最大正方形,并返回其面积。 示例: 输入: 1 0 1 0 01 0 …
61. Rotate List
61. Rotate List 题目 Given a list, rotate the list to the right by k places, where k is non-negative. Example: G…
34. Search for a Range
欢迎fork and star:Nowcoder-Repository-github 34. Search for a Range 题目 Given an array of integers sorted in asce…
[LeetCode] Simplify Path 简化路径
Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", =&g…
[LeetCode] Restore IP Addresses 复原IP地址
Given a string containing only digits, restore it by returning all possible valid IP address combinatio…