摘要: 问题描述: 给定一个整数数组,找出总和最大的连续数列,并返回总和。 示例: 输入: [-2,1,-3,4,-1,2,1,-5,4] 输出: 6 解释: 连续子数组 [4,-1,2,1] 的和最大,为 6。 状态转移方程 dp[i] = max(dp[i-1]+nums[i],nums[i]); 未优 阅读全文
posted @ 2020-08-29 21:49 顾wenfan 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 你是一个专业的小偷,计划偷窃沿街的房屋。每间房内都藏有一定的现金,影响你偷窃的唯一制约因素就是相邻的房屋装有相互连通的防盗系统,如果两间相邻的房屋在同一晚上被小偷闯入,系统会自动报警。 给定一个代表每个房屋存放金额的非负整数数组,计算你 不触动警报装置的情况下 ,一夜之内能够偷窃到的最高金额。 示例 阅读全文
posted @ 2020-08-24 23:36 顾wenfan 阅读(132) 评论(0) 推荐(0) 编辑
摘要: git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --ab 阅读全文
posted @ 2020-07-14 11:51 顾wenfan 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Redis Cluster 原生命令搭建 1.节点配置文件 vim redis-cluster-7000.conf port 7000 daemonize yes dir "/usr/local/redis-4.0.11/db" logfile /usr/local/redis-4.0.11/log 阅读全文
posted @ 2020-05-29 09:48 顾wenfan 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 定义节点 public class ListNode { public int val; public ListNode next; public ListNode(int x){ this.val = x; } } 两数相加 public class AddTwoNums { public sta 阅读全文
posted @ 2020-04-26 13:24 顾wenfan 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 转载:https://www.cnblogs.com/xiechenglin/p/10441846.html 阅读全文
posted @ 2020-03-21 09:40 顾wenfan 阅读(1143) 评论(0) 推荐(0) 编辑
摘要: 引入treeTable需要的文件后始终不能加载出树状的表格原因: 从后端加载出的数据必须符合树状的结构,例如: <tr data-tt-id='1111' data-tt-parent-id='0'> <td></td> <td></td> <td></td> ...... </tr> <tr da 阅读全文
posted @ 2020-02-12 21:07 顾wenfan 阅读(688) 评论(0) 推荐(0) 编辑
摘要: 问题:多模块之间不能将controller编进去。 最近开始毕业设计,在整合之前的权限系统时,需要用到多模块的开发: 模块之间的maven依赖关系如下图 图画的有点丑.......总之就是admin,server 需要依赖core中的类 刚开始将springboot启动类放在了core中,以为这样可 阅读全文
posted @ 2020-01-24 13:26 顾wenfan 阅读(3149) 评论(0) 推荐(0) 编辑
摘要: Springboot替换的banner的方法网上讲的很详细,就是将banner.txt放在resources目录下,可是我怎么也不能替换,网上都没其他什么方法,我的pom.xml文件和其他人的不太一样,查看Springboot编译后的内容:发现target中只有application.yml文件,并 阅读全文
posted @ 2020-01-14 14:15 顾wenfan 阅读(1803) 评论(1) 推荐(0) 编辑
摘要: #include<stdio.h> #include<malloc.h> #include<stdlib.h> #include<stdbool.h> typedef struct Node{ int data; struct Node* next; }Node; typedef struct Stack{ Node* top; Node* bottom; }Stack; void InitSta 阅读全文
posted @ 2019-09-17 09:55 顾wenfan 阅读(486) 评论(0) 推荐(0) 编辑