Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2008
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    what is the best method to sort strings in real time or off line ?

    Hello all
    i have program that needs to collect strings from different kinds of resources.
    now the strings can be duplicated and i need to sort them i wander what will be the best way
    to do that or to divide the job to 2 phases in which first phase will collect the data without checking duplication
    just write then to file and in the second phase i will use unix "sort -u" on the files and then the program will handle the
    new information
    or
    do it all in one phase and every string will be kept into map and then every time the program collects new string it will check agents the map
    to see if it already there .
    in term of speed what will be the best solution ?

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Location
    USA
    Posts
    527
    Thanks
    26
    Thanked 74 Times in 72 Posts
    Trinithis


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •