摘要: class MinStack { Deque<Integer> stack; Deque<Integer> min_stack; /** initialize your data structure here. */ public MinStack() { stack = new LinkedLis 阅读全文
posted @ 2020-10-04 08:58 dlooooo 阅读(71) 评论(0) 推荐(0) 编辑
摘要: class Solution { private TreeNode res = null; public boolean dfs(TreeNode root,TreeNode p,TreeNode q){ if(root==null){ return false; } boolean lchild 阅读全文
posted @ 2020-10-04 08:46 dlooooo 阅读(73) 评论(0) 推荐(0) 编辑
摘要: class Solution { public void HeapAdjust(int[] nums,int s,int d){ //int t = nums[s]; int k = s; for(int i=s*2+1;i<=d;i=i*2+1){ if((i+1<=d)&&nums[i]<num 阅读全文
posted @ 2020-10-04 08:24 dlooooo 阅读(146) 评论(0) 推荐(0) 编辑