Binary Tree Preorder Traversal 描述 分析 栈 Morris先序遍历 相关题目 Binary Tree Preorder Traversal 描述 Given a binary tree, return the preorder traversal of its nodes' values. For e...
Candy 描述 分析 迭代版 递归版 Candy 描述 There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the f...
House Robber 描述 分析 解法1 解法2 House Robber 描述 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only...
Restore IP Addresses 描述 分析 代码 Restore IP Addresses 描述 Given a string containing only digits, restore it by returning all possible valid IP address combinations. For examp...
Longest Common Prefix 描述 分析 纵向扫描 横向扫描 Longest Common Prefix 描述 Write a function to find the longest common prefix string amongst an array of strings. 分析 从位置0开始,对每一个位置比...