算法题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了算法题相关的知识,希望对你有一定的参考价值。
随机生成10000个数字(10000-99999之间的数组),把数字分别写入10个文件中,要求每个文件只存1000个数字,每行只存一个数,给出一个指定的数,判断是否在10
* 个文件中。在文件中显示存在,并显示在哪个文件中。
* 1.生成10000个不重复的数字组成的数组
* 2.每个文件存1000个数字
* 3.从文件中查找指定的数字,存在不存在 具体到哪个文件中
* 4.考虑如何快速查找是否存在该数
代码如下




以上是关于算法题的主要内容,如果未能解决你的问题,请参考以下文章