上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2019-06-04 16:49 程嘿嘿 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, 阅读全文
posted @ 2019-06-03 18:21 程嘿嘿 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 实现效果 效果1:点击标签跳转到页面的指定位置 效果2:当页面滑动到相应位置时导航栏样式改变 效果如下: 方法: 使用scrollTop进行定位和跳转。 首先,在HTML中给跳转到的结点设置id 然后在js中设置点击事件,点击导航栏的按钮使窗口跳转指定位置。 scrollTop() 方法返回或设置匹 阅读全文
posted @ 2019-05-30 18:24 程嘿嘿 阅读(11164) 评论(0) 推荐(0) 编辑
摘要: 图片居中 方法1.将放置图片的容器的布局改为 display: table-cell; text-align: center; 可以使容器内的元素均居中显示。效果如下: 如果需要水平垂直居中,添加 display: table-cell; text-align: center; vertical-a 阅读全文
posted @ 2019-05-30 17:34 程嘿嘿 阅读(2300) 评论(0) 推荐(0) 编辑
摘要: 将文字或者其他元素和图片重叠 1.上层为块级元素,效果图: 设置上边元素的定位为 再根据相对图片的位置调整right、left、top和bottom值 2.当上层元素是文字时,效果图: 可设置文本框的区域大小,然后将图片设置为背景 阅读全文
posted @ 2019-05-30 17:12 程嘿嘿 阅读(6998) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d 阅读全文
posted @ 2019-05-27 20:55 程嘿嘿 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2019-05-23 20:36 程嘿嘿 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 问题:Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node' 原因:appendChild的参数为node节点,导致这样的问题说明当前的参数不是node,有可能是字符串。 例如: 这时dom是字符串 解 阅读全文
posted @ 2019-05-23 16:34 程嘿嘿 阅读(49032) 评论(0) 推荐(2) 编辑
摘要: Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally ident 阅读全文
posted @ 2019-05-21 10:18 程嘿嘿 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 阅读全文
posted @ 2019-05-17 11:45 程嘿嘿 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页