class CQueue { Stack<Integer> stack1; Stack<Integer> stack2; public CQueue() { stack1 = new Stack(); stack2 = new...
class Solution { public ListNode deleteNode(ListNode head, int val) { ListNode myHead = new ListNode(-1); myHead.next =...
剑指 Offer 27. 二叉树的镜像 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; *...
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; *...
剑指 Offer 30. 包含min函数的栈 class MinStack { Stack<Integer> stack1; Stack<Integer> stack2; /** initialize your data structure...
/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val =...
剑指 Offer 32 - II. 从上到下打印二叉树 II class Solution { public List<List<Integer>> levelOrder(TreeNode root) { Queue<TreeNode>...
剑指 Offer 32 - III. 从上到下打印二叉树 III /** * Definition for a binary tree node. * public class TreeNode { * int val; *...
1. proxy_pass后面加根路径/ location ^~/user/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;...
在工作中,我们有时候需要将一些公共的功能封装,比如操作日志的存储,防重复提交等等。这些功能有些接口会用到,为了便于其他接口和方法的使用,做成自定义注解,侵入性更低一点。别人用的话直接注解就好。下面就来讲讲自定义注解这些事情。 1....