Description: Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9…
分类:LeetCode
LeetCode | Add Two Numbers
题目: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse ord…
LeetCode 279 Perfect Squares
题目描述 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …)…
[Leetcode] Group Anagrams 变形词
Group Anagrams 最新更新请见:https://yanjia.me/zh/2019/01/… Given an array of strings, group anagrams together.…
[Leetcode] Roman to Integer and Integer to Roman 罗马数阿拉伯数转换
Valid Roman Numeral 正则表达式 思路 首先我们要熟悉罗马数的表达方式。M是1000,D是500,C是100,L是50,X是10,V是5,I是1。验证字符串是否是罗马数,我们先看一下有效的罗马数是什么样…
[Leetcode] Climbing Stairs 爬楼梯
Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either …
[Leetcode] Kth Largest Element in an Array 数组中第K大元素
Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth lar…
【leetcode】10. Regular Expression Matching 简易正则匹配
1. 题目 Implement regular expression matching with support for ‘.’ and ‘*’. ‘.R…
LeetCode | Remove Duplicates from Sorted Array II(删除重复的元素2)
Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For example,…
045 Jump Game II[H]
1 题目描述 Given an array of non-negative integers, you are initially positioned at the first index of the array. …
209. 长度最小的子数组
209. 长度最小的子数组 问题 给定一个含有 个正整数的数组和一个正整数 ,找出该数组中满足其和 的长度最小的连续子数组。如果不存在符合条件的连续子数组,返回。 示例: 输入: 输出: 解释: 子数组 是该条件下的长度…
LeetCode刷题之Two Sum II
Problem Given an array of integers that is already sorted in ascending order, find two numbers such that they …