罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。字符 数值I 1V 5X 10L 50C 100D 500M 1000例如, 罗马数字 2 写做 II ,即为两个并列的 1。12 写做 XII ,即为 X + II 。 27 写做 XXVII, 即为 XX + V + II 。通常 ...
分类:
其他好文 时间:
2020-06-28 13:39:42
阅读次数:
56
(一)题目: 求两个乘积最小的数 题目: 输入一个递增排序的数组和一个数字S,在数组中查找两个数, 使得他们的和正好是S,如果有多对数字的和等于S,输出乘积最小的两个数 思路: 定义两个指针,分别从前面和后面进行遍历,间隔越远的乘积越小,所以是最先出现的两个数乘积最小 (二)代码及测试 packag ...
分类:
其他好文 时间:
2020-06-28 11:20:24
阅读次数:
60
在开始之前,我先卖个关子提一个问题:我们现在有一个Employee员工类。 @Data @AllArgsConstructor public class Employee { private Integer id; private Integer age; //年龄 private String g ...
分类:
数据库 时间:
2020-06-28 09:32:26
阅读次数:
74
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Example 1: Input: n = 12 O ...
分类:
其他好文 时间:
2020-06-28 09:27:41
阅读次数:
56
Integer Break (M) 题目 Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. R ...
分类:
其他好文 时间:
2020-06-28 09:27:07
阅读次数:
43
偶遇需求,大表中需要删除部分数据。分批删除。 declare TYPE type_table_rowid IS TABLE OF ROWID INDEX BY BINARY_INTEGER;table_rowid type_table_rowid;CURSOR cur_tmp IS select r ...
分类:
其他好文 时间:
2020-06-28 09:23:19
阅读次数:
65
Flatten Nested List Iterator (M) 题目 Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list ...
分类:
其他好文 时间:
2020-06-28 09:23:02
阅读次数:
45
ArrayList<String> arrayList = new ArrayList<String>(); <String>指泛型,规定这里存储什么类型数据 存储int型用Integer 存储double型用Double public class ArrayListTest { public st ...
分类:
编程语言 时间:
2020-06-27 22:46:21
阅读次数:
58
一。Java中八种基本数据类型对应的包装类型 基本数据类型 包装类型 bytes java.lang.Bytes; short java.lang.Short; int java.lang.Integer; long java.lang.Long; float java.lang.Float; do ...
分类:
编程语言 时间:
2020-06-27 20:25:09
阅读次数:
65
String: 下面三条语句分别创建了几个对象: String s1=new String("abc");// 2 堆中一个,方法区一个 String s2="abc";// 0 String s3=new String("abc");// 1 堆中一个 String s4="he"+"ll"+"o ...
分类:
编程语言 时间:
2020-06-27 20:20:43
阅读次数:
53