Live2D
摘要: /* 在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对。输入一个数组,求出这个数组中的逆序对的总数。 输入: [7,5,6,4] 输出: 5 */ //其实就是归并排序 在左侧的一个元素大于右数组的一个元素时 左侧元素本身以及左数组剩余的元素都能组成一个逆序对 clas 阅读全文
posted @ 2021-02-10 20:41 细雪之舞0213 阅读(82) 评论(0) 推荐(0)
摘要: public class 丑数 { public static void main(String[] args) { int result; result = new 丑数().GetUglyNumber_Solution(7); System.out.println(result); } publ 阅读全文
posted @ 2021-02-10 17:10 细雪之舞0213 阅读(53) 评论(0) 推荐(0)
摘要: //归纳当前为cur为不同值时当前为1的个数的规律 public class 整数1出现的次数优解 { public static void main(String[] args) { int count = new 整数1出现的次数优解().NumberOf1Between1AndN_Soluti 阅读全文
posted @ 2021-02-10 11:59 细雪之舞0213 阅读(58) 评论(0) 推荐(0)