1. 题目 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Foll…
分类:LeetCode题目解答
LeetCode 049 Group Anagrams
题目描述 Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat…
[Leetcode] Decode Ways 解码方式
Decode Ways 最新更新请见:https://yanjia.me/zh/2019/02/… A message containing letters from A-Z is being encoded…
[LeetCode] Array Partition I 数组分割之一
Given an array of 2n integers, your task is to group these integers into n pairs of…
[LeetCode] Largest Number At Least Twice of Others 至少是其他数字两倍的最大数
In a given integer array nums, there is always exactly one largest element. Find whether the large…
【leetcode】38. Count and Say 数字转换
1. 题目 The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, …
[LeetCode] Longest Increasing Path in a Matrix 矩阵中的最长递增路径
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either…
[LeetCode] Repeated Substring Pattern 重复子字符串模式
Given a non-empty string check if it can be constructed by taking a substring of it and appending multi…
leetcode-149. Max Points on a Line
题目表述 Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 分析 暴力…
[LeetCode] Find Leaves of Binary Tree 找二叉树的叶节点
Given a binary tree, collect a tree’s nodes as if you were doing this: Collect and remove all lea…
LeetCode | Single Number II
题目: Given an array of integers, every element appears three times except for one. Find that single o…
【leetcode】90. Subsets II 有重复元素集合的所有组合形式
1. 题目 Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: T…