从数组中计算重复元素 [英] count duplicate elements from array

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

问题描述

亲爱的,





int array_numbers [] = {1,2,3,4,1,2,3, 1,9,6,7,8};



从阵列中找到家庭重复数字的最佳方法是什么,每个重复的数字都是重要的。





问候,

Ranjith

Dear All,


int array_numbers[]={1,2,3,4,1,2,3,1,9,6,7,8};

what will be the best way to find home duplicate numbers from the array and each duplicate numbers count.


Regards,
Ranjith

推荐答案

sort数组,然后开始计算/删除



访问链接

http://stackoverflow.com/questions/4003584/more-elegant-way-to-check-for-duplicates-in-c -array [ ^ ]



快乐编码!

:)
sort array and then start counting/deleting

visit link
http://stackoverflow.com/questions/4003584/more-elegant-way-to-check-for-duplicates-in-c-array[^]

Happy Coding!
:)


这篇关于从数组中计算重复元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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