Design and implement a data structure for a compressed string iterator. It should support the following…
分类:LeetCode题目解答
[LeetCode] Maximum Width of Binary Tree 二叉树的最大宽度
Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree i…
Reverse Nodes in k-Group解题报告
Description: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.…
LeetCode | Search for a Range
题目: Given a sorted array of integers, find the starting and ending position of a given target value. Your algo…
LeetCode | Roman to Integer
题目: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999…
128. Longest Consecutive Sequence
欢迎fork and star:Nowcoder-Repository-github 128. Longest Consecutive Sequence 题目 Given an unsorted array of int…
140. Word Break II(hard)
欢迎fork and star:Nowcoder-Repository-github 140. Word Break II 题目: Given a non-empty string s and a dictionary …
[LeetCode] Add Two Numbers 两个数字相加,2.5 Add Two Numbers 两个数字相加
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse …
[LeetCode] Permutations 全排列,Combinations,Combinations,Combinations
Given a collection of distinct integers, return all possible permutations. Example: Input: [1…
[LeetCode] Longest Substring with At Most K Distinct Characters 最多有K个不同字符的最长子串
Given a string, find the length of the longest substring T that contains at most k distinct characters.…
[LeetCode] K Empty Slots K个空槽
There is a garden with N slots. In each slot, there is a flower. The N flowers will…
75. Sort Colors
Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color…