Check whether the original sequence org can be uniquely reconstructed from the sequences in seqs. The o…
分类:LeetCode
[Leetcode] Swap Nodes in Pairs Reverse Nodes in k-Group 成组反转链表
Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example, Given…
[Leetcode] Combinations 组合数
Combinations Given two integers n and k, return all possible ombinations of k numbers out of 1 … n. For …
[Leetcode] Palindrome Number 回文数
Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. 反转比较法 Reverse and…
【leetcode】104. Maximum Depth of Binary Tree
1. 题目 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest …
[Leetcode] Simplify Path
题目链接https://oj.leetcode.com/problems/simplify-path/ Description Given an absolute path for a file (Unix-style)…
leetCode_697. Degree of an Array
题目描述: Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximu…
536. Construct Binary Tree from String
You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input repr…
[LeetCode] Convert Sorted Array to Binary Search Tree 将有序数组转为二叉搜索树
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For t…
210. Course Schedule II
There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, f…
[Leetcode] Merge Intervals and Insert Interval 合并间隔与插入间隔
Merge Intervals 最新更新请见 https://yanjia.me/zh/2019/02/… Given a collection of intervals, merge all overlap…
225. Implement Stack using Queues
225. Implement Stack using Queues 题目: https://leetcode.com/problems/implement-stack-using-queues/ 难度: Easy 又到了…