摘要: Question You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one elemen 阅读全文
posted @ 2019-09-24 23:27 树獭君 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Question A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, where S[i] = {A[i], A[A[ 阅读全文
posted @ 2019-09-19 23:41 树獭君 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Question Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left 阅读全文
posted @ 2019-09-16 06:43 树獭君 阅读(278) 评论(0) 推荐(0) 编辑
摘要: Question Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after 阅读全文
posted @ 2019-09-13 23:33 树獭君 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Question For an undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all poss 阅读全文
posted @ 2019-09-13 22:37 树獭君 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Question Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 阅读全文
posted @ 2019-09-12 12:37 树獭君 阅读(316) 评论(0) 推荐(0) 编辑
摘要: Question Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome par 阅读全文
posted @ 2019-09-06 23:32 树獭君 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Question Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following 阅读全文
posted @ 2019-08-30 23:59 树獭君 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Question There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you 阅读全文
posted @ 2019-08-30 12:51 树獭君 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Question Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “ 阅读全文
posted @ 2019-08-19 07:37 树獭君 阅读(172) 评论(0) 推荐(0) 编辑