数组排序算法用于查找重复值 [英] Array Sort Algorithm to find duplicate values

查看:84
本文介绍了数组排序算法用于查找重复值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到一种方法来浏览我的_ReadingArrayList3并查看inarrayindex中存储的任何数字是否重复。我需要先收集所有数据并将其放入数组中,一旦数组填满我调用我的排序SortArray()Sub将查看_ReadingArrayList3中的每个arrayindex,此时此后我可以; t似乎找到如何比较数组中的值。下面是我一直在处理的代码。


谢谢

i need to find a way to look through my _ReadingArrayList3 and see if any number stored in the inarrayindex are duplicated. I need to first collect all the data and place it into the array, once the array is filled i call my sort SortArray() Sub that will look at every arrayindex in the _ReadingArrayList3, at this time after that i can;t seem to find out how to compare values in the array. Below is the code i have been working on.

Thanks

展开 | 选择 | 换行 | 行号

推荐答案

一个提示 - 通过使用Collection(或可能是Dictionary)而不是数组,可以防止添加重复项。
One tip - by using a Collection (or possibly a Dictionary) instead of an array, you can prevent duplicates being added.


Here''sa可能很方便的小程序...

Here''s a little routine that might be handy...

展开 | 选择 | Wrap | Line数字



这是一个可能很方便的小程序...

Here''s a little routine that might be handy...

展开 | 选择 | Wrap | 行号


这篇关于数组排序算法用于查找重复值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆