By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,798 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,798 IT Pros & Developers. It's quick & easy.

identifying same elements of an array .

P: 1
i got an assingment and am really struck at it

the question is :
IN AN ARRAY IDENTIFY THE ELEMENT WHICH HAS OCCURED MAXIMUM NO OF TIMES AND ALSO TELL HOW MANY TIMES IT DID.


in the process of trying it i really could not control the increasing no of loops.

please help
Sep 28 '06 #1
Share this Question
Share on Google+
2 Replies


Banfa
Expert Mod 5K+
P: 8,916
Post the code you had
Sep 28 '06 #2

100+
P: 293
D_C
If you knew the maximum and minimum elements of the array, you could use an array that increments the same entry every time the same number is encountered. But then you would have to find the maximum in the new array you created.
Sep 28 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.