- 博客(6)
- 收藏
- 关注
原创 力扣 19删除链表的倒数第N个节点
public ListNode removeNthFromEnd(ListNode head, int n) { ListNode p=head;//指针完成遍历链表 ListNode q=head;//指向要删除数据 ListNode x=head;//指向要删除的前一个 int i=0;//记录标志 while(p!=null){ p=p.next; i++; .
2022-03-04 20:12:47 262
原创 力扣122. 买卖股票的最佳时机 II
public int maxProfit(int[] prices) { int len=prices.length; int sum=0;//记录总利润 int min=prices[0];//记录买入小值 int max=0;//记录每次收益值 for(int i=0;i<len;i++){ if(min>prices[i]){//寻找小值进行买入 min=prices[i]; ..
2022-03-02 21:16:59 77
原创 力扣104. 二叉树的最大深度
public int MAX(TreeNode root ,int i){ if(root==null){ return i; } int max=i+1; int right = MAX(root.right,max); int left= MAX(root.left,max); if(max<right){ max=right; }
2022-02-28 21:44:03 173
原创 【无标题】l力扣100. 相同的树
* Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNode left, TreeNode right) { * .
2022-02-28 19:12:40 94
原创 ### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no g
### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'module' in 'class test.bean.Role'### The error may exist in mapper/RoleMapper.xml### The error may involve test.dao.RoleMapper.s
2022-01-20 13:27:21 648
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人