函数接口定义: 1 List Reverse( List L ); 其中 List结构定义如下: 1 typedef struct Node *PtrToNode; 2 struct Node { 3 ElementType Data; /* 存储结点数据 */ 4 PtrToNode Next; ...
分类:
其他好文 时间:
2020-06-09 16:24:25
阅读次数:
67
随机生成6位验证码代码 # -*- coding: utf-8 -*- import random def generate_verification_code(): ''' randomly generated a 6 bit verification code ''' code_list = [ ...
分类:
编程语言 时间:
2020-06-09 09:55:45
阅读次数:
74
Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,...,xn,yn]. Example ...
分类:
其他好文 时间:
2020-06-09 09:20:59
阅读次数:
68
非递归遍历二叉树借用List实现的,具体实现方法如下。前序遍历非递归代码实现:publicList<Integer>preOrder(TreeNoderoot){List<Integer>list=newArrayList<>();if(root==null){returnlist;}list.add(root.val);//根据前序遍历的特性,先将根节点的值加
分类:
其他好文 时间:
2020-06-09 09:17:36
阅读次数:
64
pg 常用字段类型: 类型 存储长度 描述 int2/smallint 2字节 小范围整数 int4/integer 4字节 常用的整数 varchar(n) 变长 有长度限制 bool 1字节 true/false timestamp 8字节 日期和时间(无时区) 主键: 指的是一个列或多列的组合 ...
分类:
其他好文 时间:
2020-06-08 20:45:34
阅读次数:
122
public class FunctionDemo { public static void main(String[] args) { convert("100", s -> Integer.parseInt(s)); convert(100, i -> String.valueOf(i + 56 ...
分类:
其他好文 时间:
2020-06-08 19:06:20
阅读次数:
65
常用类 Arrays Arrays 类包含用于操作数组的各种方法(例如排序和搜索)。还包含一个静态工厂,允许将数组转为 List。 方法 描述 List asList(T... a) 返回由指定数组构造的 List void sort(Object[] a) 对数组进行排序 void fill(Ob ...
分类:
编程语言 时间:
2020-06-07 21:25:44
阅读次数:
107
java中对数组进行排序 使用Array.sort() 这个默认是升序 @Test public void index4(){ int scores[] = new int[]{1,2,3,89,4}; Arrays.sort(scores); for (int i:scores ) { Syste ...
分类:
编程语言 时间:
2020-06-07 19:17:31
阅读次数:
205
Java 是一个近乎纯洁的面向对象编程语言,但是为了编程的方便还是引入了基本 数据类型,但是为了能够将这些基本数据类型当成对象操作,Java 为每一个基本 数据类型都引入了对应的包装类型(wrapper class),int 的包装类就是 Integer, 从 Java 5 开始引入了自动装箱/拆箱 ...
分类:
其他好文 时间:
2020-06-07 16:43:40
阅读次数:
84
public class Palindrome_Number9 { public static boolean isPalindrome(int x) { if(x<0){ return false; } String result=new Integer(x).toString(); for(in ...
分类:
其他好文 时间:
2020-06-07 15:11:13
阅读次数:
54