摘要: 注释:对程序的解析 注释:代码解析 /** 文档注释:快捷键:Alt+control+J,设置:Window --> Preferences --> Java --> Code Style --> Code Templates --> Comments --> types --> Edit... * 阅读全文
posted @ 2021-03-11 23:14 cdan134 阅读(70) 评论(0) 推荐(0)
摘要: 选择排序规则:每一次从待排序的数据元素中选出最小(或最大)的一个元素,存放待排序序列的起始位置(或末尾位置),直到全部待排序的数据元素排完 动态图: 代码 public static void main(String[] args) { int[] arr = new int[] { 99, 54, 阅读全文
posted @ 2021-03-10 15:34 cdan134 阅读(69) 评论(0) 推荐(0)
摘要: 快速排序排序规则: 从要排序的数据中取一个数为“基准数”。 通过一趟排序将要排序的数据分割成独立的两部分,其中左边的数据都比“基准数”小,右边的数据都比“基准数”大。 然后再按步骤2对这两部分数据分别进行快速排序,整个排序过程可以递归进行,以此达到整个数据变成有序序列 排序动图: 对应代码 publ 阅读全文
posted @ 2021-03-10 15:19 cdan134 阅读(145) 评论(0) 推荐(0)
摘要: 冒泡算法的规则: 每一次从待排序的数据元素中选出最小(或最大)的一个元素,存放待排序序列的起始位置(或末尾位置),直到全部待排序的数据元素排完 动态图: 对应代码 static void swap(int[] arr, int addr1, int addr2) { //数组数据交换 if (add 阅读全文
posted @ 2021-03-10 15:07 cdan134 阅读(105) 评论(0) 推荐(0)
摘要: 本练习为复习python的符号和关键字 数据类型有:True False None Strings numbers floats lists dict tuple set """ Data Types True False None Strings numbers floats lists dict 阅读全文
posted @ 2020-12-04 16:00 cdan134 阅读(68) 评论(0) 推荐(0)
摘要: 本练习为复习python的符号和关键字 关键字有: #and or False True print(1==0 and 2==0, 1==0 or 2==0) print(False) print(True)输出: False FalseFalseTrue lists = ['1', '2', 'a 阅读全文
posted @ 2020-12-02 17:00 cdan134 阅读(55) 评论(0) 推荐(0)