码迷,mamicode.com
首页 >  
搜索关键字:easyui treegrid treenode    ( 5856个结果
#树#递归#二叉树的镜像
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ ...
分类:其他好文   时间:2020-07-15 23:31:48    阅读次数:66
leetcode 0404 二叉树检查平衡性 DFS
public boolean isBalanced(TreeNode root) { if (root == null) { return true; } int diff = getDepth(root.left) - getDepth(root.right); diff = diff > 0 ? ...
分类:其他好文   时间:2020-07-15 22:51:05    阅读次数:53
EasyUI限制时间选择(开始时间小于结束时间)
datebox限制时间选择 对datebox可选择日期进行限制,目前感觉使用起来效果很好,不可选择的日期置灰不可点击 1. 限制开始时间小于结束时间 //using limitStartDateAndEndDate($("#DateStart"), $("#DateEnd")); /** * 限制开 ...
分类:其他好文   时间:2020-07-14 18:36:28    阅读次数:123
549. 二叉树中最长的连续序列
class Solution { public int longestConsecutive(TreeNode root) { dfs(root); return res; } private int res = 0; public int[] dfs(TreeNode root) { // 以ro ...
分类:其他好文   时间:2020-07-14 18:25:06    阅读次数:49
124. 二叉树中的最大路径和
class Solution { public int maxPathSum(TreeNode root) { dfs(root); return res; } int res = Integer.MIN_VALUE; public int dfs(TreeNode root) { // 返回以当前 ...
分类:其他好文   时间:2020-07-14 18:15:42    阅读次数:58
BFS广度遍历代码模板
BFS广度遍历代码模板 /** 广度遍历代码模板 */ public class TestBFS { public List<List<Integer>> bsf(TreeNode root) { // 如果节点为空 if (root == null) { return null; } List<L ...
分类:其他好文   时间:2020-07-13 18:26:06    阅读次数:70
LeetCode94二叉树中序遍历
题目链接 https://leetcode-cn.com/problems/binary-tree-inorder-traversal/ 题解一:递归 // Problem: LeetCode 94 // URL: https://leetcode-cn.com/problems/binary-tr ...
分类:其他好文   时间:2020-07-13 15:36:49    阅读次数:58
easyUi刷新 tabs
var tab = $('#maintabs').tabs('getSelected'); //获得当前选中的tab 的href var url = $(tab.panel('options')).attr('href'); tab.panel('refresh', url); ...
分类:其他好文   时间:2020-07-13 11:27:12    阅读次数:57
LeetCode144二叉树前序遍历
题目链接 https://leetcode-cn.com/problems/binary-tree-preorder-traversal/description/ 题解一:递归 // Problem: LeetCode 144 // URL: https://leetcode-cn.com/prob ...
分类:其他好文   时间:2020-07-13 00:00:50    阅读次数:90
二叉树--层序遍历(leetcode 102
BFS和DFS DFS遍历使用递归(隐式使用栈): void dfs(TreeNode root) { if (root == null) { return; } dfs(root.left); dfs(root.right); } BFS遍历使用队列 void bfs(TreeNode root) ...
分类:其他好文   时间:2020-07-12 22:04:02    阅读次数:66
5856条   上一页 1 ... 13 14 15 16 17 ... 586 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!