![]() |
|
#1
|
|||
|
|||
Mode of an arrayCan anyone help me with the C++ code for finding the mathematical mode of an array?
|
|
#2
|
||||
|
||||
|
Here is a function that I have recently written to calculate the mode. You will have to adapt it to fit your needs. This uses a custom list function that I wrote. You can replace it with an array or a vector or whater you would like.
CPP / C++ / C Code:
It is uncommented and needs some helper data structures, but hopefully, it can be of some help for you to implement a mode routine to your program. __________________
The best damn Sports Blog period. |
Recent GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Speed up C++ code about 3d array! | Truong Son | C++ Forum | 0 | 16-Mar-2004 21:52 |
| [Tutorial] Standard I/O | aaroncohn | C Programming Language | 20 | 27-Feb-2004 21:07 |
| c: array comparison | jack | C Programming Language | 7 | 26-Jan-2004 11:21 |
| Extra null element in an array | samtediou | MySQL / PHP Forum | 2 | 11-Dec-2003 11:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The