题目: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse ord…
分类:LeetCode题目解答
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] Counting Bits 计数位
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the num…
[LeetCode] Linked List Random Node 链表随机节点
Given a singly linked list, return a random node’s value from the linked list. Each node must hav…
[LeetCode] Subarray Sum Equals K 子数组和为K
Given an array of integers and an integer k, you need to find the total number of continuous subar…
[LeetCode] Asteroid Collision 行星碰撞
We are given an array asteroids of integers representing asteroids in a row. For each asteroi…
LeetCode | Binary Tree Level Order Traversal
题目: Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left…