Basically I need the algorithm similar to WinXP start menu which display the most frequently used programs. Is there any common algorithm for that floating around the net? Just give me the algorithm name and I'll do my own research
thnx in advance
Basically I need the algorithm similar to WinXP start menu which display the most frequently used programs. Is there any common algorithm for that floating around the net? Just give me the algorithm name and I'll do my own research
thnx in advance
source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense
Yeah, we call it the for loop.
Quzah.Code:int array[SIZE]; /* fill array here... */ int x, highest; for( x = highest = 0; x < sizeof array / sizeof array[0]; x++ ) if( array[x] > array[highest] ) highest = x;
Hope is the first step on the road to disappointment.
You want me to compare the count of each item has been used? It's not gonna work well because say I used a program 1000 times then it will take the other items 1001 to replace the most used.
source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense
why not have somekind of a search tree structure (AVL for example) where they key would be the item and the value would be frequency of use. You just have to figure out some tie braking method and you should be set.
some entropy with that sink? entropysink.com
there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka
Then only keep a record to a certain point. For example, don't allow any program to be counted as having been used more than say, 50 times. Or have each use time out after a certain number of days - but that would require a lot more disk space.
Then after 50 times all items will have the same position.???Originally Posted by sean_mackrory
This one is what I've thought of the most. I have to reset something at some point.Originally Posted by sean_mackrory
*posibility 1* reset all items' counts after say, 3 days, but then on the fourth day I have to make sure to use old-most-used items so that they won't be replaced.
*posibility2* reset count of all items that haven't been used for the past 3 days. Sounds better, do you see any flaws?
*or maybe other possibilities?
Last edited by alphaoide; 07-20-2004 at 07:16 PM.
source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense
Keep track of
1) The number of times used in the last X days
2) The last time it was used
If a program hasn't been used in Y days then consider it unused
If a program has a higher per day usage in the last Z days then another program it is ranked higher.
Oh, sweet, I'll just implement this one, just perfect for my need.Originally Posted by Thantos
Thanks
source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense