摘要:
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 阅读全文
摘要:
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[ 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Question Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following 阅读全文
摘要:
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 阅读全文
摘要:
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: “ 阅读全文