Permutations 描述 next_permutation() 递归 代码 相关题目 Permutations 描述 Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following p...
Merge k Sorted Lists 描述 分析 代码 相关题目 Merge k Sorted Lists 描述 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 分析 可以复用 M...
Combinations 描述 递归 相关题目 Combinations 描述 Given two integers n and k , return all possible combinations of k numbers out of 1 … n . For example,If n = 4 and k = 2 , a so...
Partition List 描述 分析 代码 Partition List 描述 Given a linked list and a value x , partition it such that all nodes less than x come before nodes greater than or equal to x . ...
Convert Sorted Array to Binary Search Tree 描述 分析 代码 相关题目 Convert Sorted Array to Binary Search Tree 描述 Given an array where elements are sorted in ascending order, conver...
Maximum Depth of Binary Tree 描述 分析 代码 相关题目 Maximum Depth of Binary Tree 描述 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along th...