摘要:
Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2: Input: n 阅读全文
posted @ 2018-09-04 14:22
轻风舞动
阅读(572)
评论(0)
推荐(0)
摘要:
Given two arrays, write a function to compute their intersection. Example 1: Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4] Exam 阅读全文
posted @ 2018-09-04 14:00
轻风舞动
阅读(809)
评论(0)
推荐(0)
摘要:
For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible roote 阅读全文
posted @ 2018-09-04 13:07
轻风舞动
阅读(741)
评论(0)
推荐(0)
摘要:
Given a binary tree, find all leaves and then remove those leaves. Then repeat the previous steps until the tree is empty. Example:Given binary tree R 阅读全文
posted @ 2018-09-04 12:52
轻风舞动
阅读(650)
评论(0)
推荐(0)
摘要:
Given a binary tree, return the values of its boundary in anti-clockwise direction starting from root. Boundary includes left boundary, leaves, and ri 阅读全文
posted @ 2018-09-04 12:40
轻风舞动
阅读(1402)
评论(0)
推荐(1)
摘要:
Given an unsorted integer array, find the smallest missing positive integer. Example 1: Example 2: Example 3: Note: Your algorithm should run in O(n) 阅读全文
posted @ 2018-09-04 08:06
轻风舞动
阅读(252)
评论(0)
推荐(0)
摘要:
A virus is spreading rapidly, and your task is to quarantine the infected area by installing walls. The world is modeled as a 2-D array of cells, wher 阅读全文
posted @ 2018-09-04 07:03
轻风舞动
阅读(672)
评论(0)
推荐(0)

浙公网安备 33010602011771号