对于一个int数组,请编写一个计数排序算法,对数组元素排序。 给定一个int数组A及数组的大小n,请返回排序后的数组。 测试样例: [1,2,3,5,2,3],6 [1,2,2,3,3,5] 计数排序 class CountingSort { public: int* countingSort(in ...
分类:
编程语言 时间:
2018-05-19 16:57:47
阅读次数:
235
question: develop a recusive solution to the previous question. answer: ...
分类:
其他好文 时间:
2018-05-19 15:45:44
阅读次数:
169
console.log('请输入三个数:'); let num1 = readline.question() - 0; let num2 = readline.question() - 0; let num3 = readline.question() - 0; let num4; if (num1 ...
分类:
Web程序 时间:
2018-05-19 14:50:02
阅读次数:
661
question; write a method remove() that takes a linked list and a string key as arguments and removes all of the nodes in the list that have key as its ...
分类:
其他好文 时间:
2018-05-19 14:47:01
阅读次数:
214
...js //输入一个三位数,水仙花数就是个位的三次方+十为的三次方+百位的三次方之和等于本身 console.log('请输入一个三位数:'); let a = readline.question(); if (a > 100 && a <= 999) { if (parseInt(a / 10 ...
分类:
Web程序 时间:
2018-05-19 14:46:19
阅读次数:
265
question: write a method max() that takes a reference to the first node in a linked list as argument and returns the value of the maxnimun key in the ...
分类:
其他好文 时间:
2018-05-19 14:41:29
阅读次数:
176
question: write a method removeafter() that takes a linked-list node as argument and removes the node following the given one(and does nothing if the ...
分类:
其他好文 时间:
2018-05-19 14:02:53
阅读次数:
124
console.log("输入年份:"); let year = readline.question() - 0; console.log("输入一个月份"); let month = readline.question() - 0; console.log("输入天数"); let day = r ...
分类:
Web程序 时间:
2018-05-19 14:02:32
阅读次数:
637
question: write a method insertafter() that takes two linked-list node arguments and inserts the second after the first on its list(and does nothing i ...
分类:
其他好文 时间:
2018-05-19 14:02:19
阅读次数:
152
console.log("请输入用户名:"); let username = readline.question(); // 接收用户输入的用户名 console.log("请输入密码:"); let password = readline.question(); // 接收用户输入的密码 let ...
分类:
Web程序 时间:
2018-05-19 13:55:28
阅读次数:
261