Thread: encryption algorithm for finding the most frequent word

  1. #16
    Registered User
    Join Date
    Jan 2010
    Posts
    412
    Quote Originally Posted by r00t View Post
    yep, it should be called bucket sort, but i dont remember the exact name.
    and yes, the whole point of this thread was to discover the right algorithm to encrypt it
    With a max word length of 30 characters.. Even if you are just using a limited character set of a-z and A-Z that's a huuuge number of different combinations. And if you scale up to unicode it grows even more. It's impossible to find a hashing or compression algorithm that won't produce collisions for 0 < N < 50000
    Quote Originally Posted by r00t View Post
    thanx for the code _Mike, i'll have a look at it
    You're welcome. Though I kinda misunderstood what was required so it doesn't do any hashing of the words. It just counts them.
    But I guess you can use it as an example on how to create a linked list or whatever

  2. #17
    Registered User
    Join Date
    Nov 2009
    Posts
    46
    that's a huuuge number of different combinations
    yeaaah i know i know... any suggestions?
    i think what im gonna do is (as it was suggested above) sort the words into the array
    and the count the most frequent one, that's an easy way of doing it...
    but you know, i wanted to do it "smart and elegant" applying some kinda math
    thanx anyways!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. encryption algorithm
    By jtullo in forum C Programming
    Replies: 3
    Last Post: 04-21-2007, 10:48 PM
  2. encryption algorithm
    By xddxogm3 in forum C++ Programming
    Replies: 3
    Last Post: 05-21-2005, 04:30 PM
  3. abt encryption algorithm
    By purIn in forum C Programming
    Replies: 9
    Last Post: 12-22-2003, 10:16 PM
  4. Word Count
    By simple in forum C Programming
    Replies: 12
    Last Post: 10-04-2002, 10:47 PM
  5. Using 'if' with char arrays or string objects
    By c++_n00b in forum C++ Programming
    Replies: 36
    Last Post: 06-06-2002, 09:04 PM