2023年7月20日
摘要: class Solution { public ListNode reverseList(ListNode head) { if (head == null || head.next == null) { return head; } ListNode preNode = null; ListNod 阅读全文
posted @ 2023-07-20 17:16 Hi,Bro 阅读(4) 评论(0) 推荐(0) 编辑
摘要: //快慢指针public class Solution { public boolean hasCycle(ListNode head) { if (head == null || head.next == null) { return false; } ListNode fastNode = he 阅读全文
posted @ 2023-07-20 16:32 Hi,Bro 阅读(2) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public ListNode getIntersectionNode(ListNode headA, ListNode headB) { if (headA == null || headB == null) { return null; } Lis 阅读全文
posted @ 2023-07-20 16:15 Hi,Bro 阅读(2) 评论(0) 推荐(0) 编辑
摘要: //将一个链表插入到另一个链表中class Solution { public ListNode mergeTwoLists(ListNode list1, ListNode list2) { if (list1 == null) { return list2; } if (list2 == nul 阅读全文
posted @ 2023-07-20 15:26 Hi,Bro 阅读(14) 评论(0) 推荐(0) 编辑
  2020年11月17日
摘要: 下面是按照天数,把每天分数分别排序 SELECT * FROM (SELECT * FROM baby_score_all WHERE `day`=20201116 ORDER BY score DESC limit 0, 1000) t1 UNION SELECT * FROM (SELECT * 阅读全文
posted @ 2020-11-17 16:12 Hi,Bro 阅读(235) 评论(0) 推荐(0) 编辑
  2020年10月29日
摘要: FST能讲一下就好了,希望自己能回来添上去。嘿嘿~ 原文链接:http://bridgeforyou.cn/2019/07/23/Inverted-Index/ 以下全部非本人所写 为什么需要倒排索引 倒排索引,也是索引。 索引,初衷都是为了快速检索到你要的数据。 每种数据库都有自己要解决的问题(或 阅读全文
posted @ 2020-10-29 21:47 Hi,Bro 阅读(1274) 评论(0) 推荐(0) 编辑
  2020年10月16日
摘要: public static void main(String[] args) { TestLambda testLambda = new TestLambda(); //消费型,消费 一个参数,无返回值 testLambda.consumer(1000,(money)->{ System.out.p 阅读全文
posted @ 2020-10-16 15:44 Hi,Bro 阅读(307) 评论(0) 推荐(0) 编辑
  2020年9月16日
摘要: 先给总结,再给实例 前提: 类B里用了@Autowired注解,类A和类B都加了@Component或者其他形式如@Service这样都注解。 结果: 如果类A 想访问类B,采用new B()的方式,则在类B里没法访问bean对象(也就是加了@Autowired的对象),会报空指针; 如果在类A中注 阅读全文
posted @ 2020-09-16 20:58 Hi,Bro 阅读(4916) 评论(0) 推荐(2) 编辑
  2020年8月10日
摘要: 不管是传递json还是form传值 注意 ,在结构体定义时 首字母必须大写 //定义结构体 Id int `form:"id"` Name string `form:"name"` //获取和绑定参数 id := context.Query("id") var user User context.B 阅读全文
posted @ 2020-08-10 11:58 Hi,Bro 阅读(2922) 评论(0) 推荐(0) 编辑
  2020年8月8日
摘要: 新学golang,呕心沥血小几天,转载请务必附上本文连接。 可能有些地方写的不是很好,请在评论区指教一二~ package main import ( "fmt" "github.com/gin-gonic/gin" _ "github.com/go-sql-driver/mysql" "githu 阅读全文
posted @ 2020-08-08 20:50 Hi,Bro 阅读(1219) 评论(5) 推荐(0) 编辑