lc
文章平均质量分 71
努力努力再努力tq
耐心看,总会看懂的!
追求实现文献算法的快感,追求学会一个新算法的充实感。(from hjimce的专栏)
展开
-
leetcode 403. Frog Jump(hard)
一、题目A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water.Given a li...原创 2018-07-19 11:04:23 · 254 阅读 · 0 评论 -
binary tree | 前序中序后序遍历
一、前序遍历题目:144. Binary Tree Preorder TraversalGiven a binary tree, return the preorder traversal of its nodes' values.Example:Input: [1,null,2,3] 1 \ 2 / 3Output: [1,2,3]...原创 2018-07-20 00:31:04 · 316 阅读 · 0 评论 -
binary tree | 层次遍历相关
一、层次遍历题目:102. Binary Tree Level Order TraversalGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tr...原创 2018-07-20 00:39:22 · 247 阅读 · 0 评论 -
binary tree | 二叉树基本操作(1)
一、题目:655. Print Binary Tree Print a binary tree in an m*n 2D string array following these rules:The row number m should be equal to the height of the given binary tree. The column number n ...原创 2018-07-20 00:48:08 · 458 阅读 · 0 评论 -
binary tree | 二叉树基本操作(2)最低公共祖先问题、平衡二叉树
一、题目:236. Lowest Common Ancestor of a Binary TreeDescriptionHintsSubmissionsDiscussSolutionPick OneGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree....原创 2018-07-20 00:52:49 · 240 阅读 · 0 评论 -
binary tree | 重建二叉树
一、题目:105. Construct Binary Tree from Preorder and Inorder Traversal Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exis...原创 2018-07-20 00:55:41 · 206 阅读 · 0 评论 -
leetcode | 排列相关题目
一、567. Permutation in StringGiven two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's permutations is the substri...原创 2018-08-07 00:03:42 · 156 阅读 · 0 评论