The Employee table holds all employees including their managers. Every employee has an Id, an…
分类:LeetCode题目解答
[LeetCode] Factor Combinations 因子组合
Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a functio…
[LeetCode] Minimum Moves to Equal Array Elements 最少移动次数使数组元素相等
Given a non-empty integer array of size n, find the minimum number of moves required to …
[LeetCode] Subtree of Another Tree 另一个树的子树
Given two non-empty binary trees s and t, check whether tree t has exactly the…
[LeetCode] Split Linked List in Parts 拆分链表成部分
Given a (singly) linked list with head node root, write a function to split the linked list into&n…
LeetCode | Integer to Roman
题目: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999…
[Leetcode] Merge Two Sorted Lists Merge K Sorted Lists 归并有序列表
Merge Two Sorted Lists 最新更新请见:https://yanjia.me/zh/2019/01/… Merge two sorted linked lists and return it…
97. Interleaving String
97. Interleaving String 题目 Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For e…
116. Populating Next Right Pointers in Each Node
欢迎fork and star:Nowcoder-Repository-github 116. Populating Next Right Pointers in Each Node 题目 Given a binary …
[LeetCode] Ugly Number II 丑陋数之二
Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors onl…
[LeetCode] Insert Interval 插入区间
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary)…
[LeetCode] Smallest Rectangle Enclosing Black Pixels 包含黑像素的最小矩阵
An image is represented by a binary matrix with 0 as a white pixel and 1 as a black…