搜索资源列表
利用双向走动法改进冒泡排序算法C语言源代码
- 传统的冒泡排序法是这样操作:从前往后,依次比较两个相邻的元素,如果逆序则交换这两个元素值,然后继续往后操作;到了数据尾部时,就找出了一个最大值(或最小值)。然后重复上面的操作n-1次(n为元素个数)。相关的改进办法:按照上面的办法来操作的话,第一次扫描把最大数(或最小数)放到最后面的位置,第二次扫描时其实只需要扫描到倒数第二个位置就可以了,因为最后一个位置已经不需要判断了,以后的操作都是类似的。这样可以减小程序运行时间。-traditional Bubble Sort method is ope
app4
- 声明一个一维数组,其长度为5,利用循环对数组元素进行赋值,然后再利用另一个循环逆序输出数组元素的内容。程序代码如下:-statement a one-dimensional array with a length of 5, the use of cyclic An element of the assignment. then use the output of another cycle reversal of the contents of the array elements. Prog
huiwenshuchu
- 一个Java应用程序,用户从键盘输入一个1~99999之间的数,程序将判断这个数是几位数,并判断这个数是不是回文数。回文数是指将该数含有的数字逆序排列后得到的数和原数相同,例如12121、3223都是回文数。-a Java application, user input from a keyboard 1 ~ 99,999 between the number of This procedure will determine the number is few, and a judgment o
javanixu
- 从键盘输入若干个字符,当输入字符”#”时中止输入。统计输入字符的个数,并将它们按输入时的逆序输出。如: 输入:inputstream# 输出:maertstupni -keyboard input from a number of characters when the input character "#" at the suspension of the import. Statistics of the number of input characters,
Huiwei
- 实现回文,即实现字符串的逆序输出,并计算其计算时间,精确到纳秒。
Sh6
- 1.创建文件和目录,并显示系统目录下sysio.ini文件的创建时间。 2.创建一个顺序文件,将用户从键盘输入的字符写入文件中,并回显在屏幕上,要求用字节流和字符流两种方式。 3.为(2)加入缓冲机制。 4.使用随机文件存取的方式对(2)中的内容逆序读出。
nixu
- 输入大于两位以上的整数,然后逆序输出,并正确得到逆序结果-Enter an integer greater than the two above, and then reverse output and reverse the results of the right to be
Java
- 编写一个java应用程序。用户从键盘输入一个1-9999之间的数,程序将判断这个数是几位数,并判断这个数是否回文数。回文数是指将数含有的数字逆序排列后得到的数和原数相同,例如12121,4224,6778776等都是回文数。 1)程序具有判断用户的输入是否为合法整数的功能。对非法输入(例如含有字母)要进行处理。 2)要判断输入数的位数,并输出相关信息。 3)要判断是否回文数。 二、二战期间,英国情报人员获取德军的一机密电报,电报的内容为: bzdz izu sxgzd
15883879GourmetCoffee
- 这是一个Java 链表的排序算法,可以将原有的链表输入的数字和字符串逆序排出。-This is a list of Java sorting algorithm, the original list can be imported from digital and string reverse.
Number
- 编写一个java应用程序。用户从键盘输入一个1-9999之间的数,程序将判断这个数是几位数,并判断这个数是否回文数。回文数是指将数含有的数字逆序排列后得到的数和原数相同,例如12121,4224,6778776等都是回文数。-Write a java application. The user from the keyboard to enter a number between 1-9999, the program will determine whether this number is
java
- 初学java编程,功能从键盘输入一组字符,保存到指定的文件后,再逆序输出,并重新保存逆序输出的文件-Beginner java programming, feature a group of characters from the keyboard, save to the specified file, and then reverse output and reverse output re-save the file
nixu
- 用Java编程,实现的功能是把一个数组里的元素逆序输出。-Using Java programming, the function is to reverse the elements of an array output.
nixushuchu
- 从键盘上输入两位数以上的数字,然后将数字逆序输出-Input from the keyboard for more than two-digit number, then the number of reverse output
java1
- 1、编写一个Java应用程序。用户从键盘输入一个1~99999之间的整数,程序将判断这个数是几位数,并判断这个数是否是回文数。回文数是指将该数含有的数字逆序排列后得到的数和原数相同,如12121和3223都是回文数。 2、编写一个Java应用程序,该程序中有一个Rational(有理数)类,具体要求如下: ?Rational类有两个int型的成员变量,名字分别为numerator(分子)和denominator(分母)。 ?提供Rational add(Rational r)方法,即
Huiwen
- 回文数 编写一个Java应用程序。用户从键盘输入一个1~99999之间的数,程序将判断这个数是几位数,并判断这个数是否是回文数。回文数是指将该数含有的数字逆序排列后得到的数和原数相同,如12121和3223都是回文数。-Palindrome write a Java application. The user from the keyboard to enter a number between 1 to 99999, the program will determine this numb
Palindrome-number
- 编写一个java应用程序。用户从键盘输入一个1-9999之间的数,程序将判断这个数是几位数,并判断这个数是否回文数。回文数是指将数含有的数字逆序排列后得到的数和原数相同,例如12121,4224,6778776等都是回文数。 1)程序具有判断用户的输入是否为合法整数的功能。对非法输入(例如含有字母)要进行处理。 2)要判断输入数的位数,并输出相关信息。 3)要判断是否回文数。 -Write a Java applications. The user from the keybo
Java
- Java数组的应用: 1、二维数组中求最大最小值 2、数字排序_字母 3、数组的经典算法 4、数组的逆序 5、杨辉三角-Java array of applications: 1, two-dimensional array in seeking maximum and minimum 2 letters numbers sort _ 3, the array of classic algorithms 4, 5 Yang Hui triangle array reverse
HomeWork1
- 编写一个java应用程序。用户从键盘输入一个1-9999之间的数,程序将判断这个数是几位数,并判断这个数是否回文数。回文数是指将数含有的数字逆序排列后得到的数和原数相同,例如12121,4224,6778776等都是回文数。-Write a java application. User from the keyboard to enter a number between 1-9999, the program will determine this number is several numb
TSP_SOLUTION
- TSP问题是一个组合优化问题,具有NPC计算复杂性。这是我上学期间考虑的所谓的双人竞技算法,Java代码,利用Jsp页面进行显示,用Servlet进行逻辑处理,思路如下: 首先,选定一个城市作为共同的出发地,同时生成两个同步的过程A和B,开始进行城市访问。 其次,约定过程A和过程B在前进过程中,过程A每到达一个城市,必须等待过程B到达另外一个城市,而后开始寻找并访问下一个未被任何过程访问过的城市。 第三,为了简化初始求解方法,过程A和过程B在寻找城市的过程中均以“距离自己最近的为被访
GetInputTest
- 个人原创代码:编写Java Application程序,将命令行第一个参数每个字符放入一字符数组,然后逆序输出。-The original code of the individual: to write a java application program, the first parameter of the command line for each character in a character array, and then reverse output.