无分类 131. Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.Example:
java leetcode398. Random Pick Index 设计一个数据结构,使得从该数据结构中查询一个数字时,能够以等概率返回该数字所在的任何下标。额外的要求是只要占用O(1)的额外的空间复杂度。
无分类 129. Sum Root to Leaf Numbers Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.
无分类 120. Triangle Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
无分类 130. Surrounded Regions 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 ‘X’s in that surrounded region.Example:
无分类 138. Copy List with Random Pointer A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.
无分类 102. Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).
无分类 143. Reorder List Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
java 【Leetcode】95~96 不同的二叉搜索树 Leetcode 95 不同的二叉搜索树 II 输入: 3输出: {代码…} 解释:以上的输出对应以下 5 种不同结构的二叉搜索树: {代码…} Leetcode 86 不同的二叉搜索树 给定一个整数 n,求以 1 … n 为节点组成的二叉搜索树…