05 2019 档案

摘要:【题目】 给定一个单向链表的头节点head,节点的值类型是整型,再给定一个 整 数pivot。实现一个调整链表的函数,将链表调整为左部分都是值小于 pivot 的节点,中间部分都是值等于pivot的节点,右部分都是值大于 pivot的节点。 除这个要求外,对调整后的节点顺序没有更多的要求。 例如:链 阅读全文
posted @ 2019-05-31 19:36 _luckyz 阅读(335) 评论(0) 推荐(0)
摘要:给定一个矩阵matrix,按照“之”字形的方式打印这 个矩阵,例如: 1 2 3 4 5 6 7 8 9 10 11 12 “之”字形打印的结果为:1,2,5,9,6,3,4,7,10,11, 8,12 斜对角线,他们的的运行轨迹分别是 向右,不能动时向下; 另一个 先向下 不能动时向右 阅读全文
posted @ 2019-05-22 21:30 _luckyz 阅读(284) 评论(0) 推荐(0)
摘要:需要加一个STS插件 配置很简单 参考了 https://blog.csdn.net/HH775313602/article/details/70176531 在 https://spring.io/tools3/sts/all 网址 选择eclipse 相应版本 选择eclispe help里的 阅读全文
posted @ 2019-05-20 21:54 _luckyz 阅读(160) 评论(0) 推荐(0)
摘要:1 package my_basic.class_3; 2 3 public class Code_07_ReverseList { 4 public static class Node{ 5 private int value; 6 private Node next; 7 8 public Node(... 阅读全文
posted @ 2019-05-10 09:44 _luckyz 阅读(165) 评论(0) 推荐(0)
摘要:1 package my_basic.class_3; 2 3 /*正方形矩阵 顺时针旋转矩阵 90度*/ 4 public class Code_06_RotateMatrix { 5 6 public static void rotate(int[][] matrix) { 7 int tr = 0; 8 int tc = ... 阅读全文
posted @ 2019-05-09 08:41 _luckyz 阅读(632) 评论(0) 推荐(0)
摘要:给定一个整型矩阵matrix,请按照转圈的方式打印它。 例如: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 打印结果为:1,2,3,4,8,12,16,15,14,13,9, 5,6,7,11, 10 【要求】 额外空间复杂度为O(1)。 阅读全文
posted @ 2019-05-08 22:57 _luckyz 阅读(184) 评论(0) 推荐(0)
摘要:public class Pet { private String type; public Pet(String type) { this.type = type; } public String getPetType() { return this.type; } } public class 阅读全文
posted @ 2019-05-08 22:17 _luckyz 阅读(156) 评论(0) 推荐(0)
摘要:1 package my_basic.class_3; 2 3 /** 4 * 用数组结构实现大小固定的队列和栈 5 */ 6 public class Code_01_Array_stack_queue { 7 8 public static class ArrayStack{ 9 private Integer[] arr; 10 ... 阅读全文
posted @ 2019-05-08 20:39 _luckyz 阅读(337) 评论(0) 推荐(0)