Given an array S of n integers, are there elements a, b, c, and d …
分类:LeetCode
LeetCode | Reverse Nodes in k-Group(k个结点一组翻转链表)
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If…
LeetCode | Divide Two Integers(两个数相除)
Divide two integers without using multiplication, division and mod operator. 题目解析: 求两个数相除,不能用乘除法。那么可以用加减法一点一点算…
LeetCode | Substring with Concatenation of All Words(链接所有单词的子串)
You are given a string, S, and a list of words, L, that are all of the same length. Find all startin…
LeetCode | Multiply Strings(字符串相乘)
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers …
LeetCode | Jump Game II(跳跃游戏II)
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each el…
LeetCode | Rotate Image(旋转图像)
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (cl…
LeetCode | Merge Intervals(合并区间间隔)
Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[…
LeetCode | Insert Interval(插入区间)
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessa…
LeetCode | Rotate List(循环右移链表)
Given a list, rotate the list to the right by k places, where k is non-negative. For examp…
LeetCode | Spiral Matrix II(螺旋矩阵填充数据)
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.…
LeetCode | Unique Paths II(唯一路径II)
Follow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many uniq…