Click here to buy some Tibia gold in our shop

Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Tibia 11 - The Battle list

  1. #21
    Join Date
    Oct 2016
    Posts
    18

    Default

    Its just that you said "almost"
    I didn't test it myself either, but I don't see how this helps COLLECTING elements. Knowing this is a binary search tree only helps when you are looking for a specific item. Collecting everything is still an O(n) scan.

  2. #22
    Join Date
    Aug 2006
    Location
    Spain
    Posts
    1,296

    Default

    I am afraid my algorithm is much slower than searching every key, at least for a big collection like this one.
    However we don't know how to enumerate all the keys here so I think we still miss a method to collect everything correctly without that list of keys.

    I am the admin. To contact me, send me an email to daniel@blackdtools.com
    Don't send pms to me! I rarely read pms. Just email me instead!

  3. #23
    Join Date
    Aug 2006
    Location
    Spain
    Posts
    1,296

    Default

    I finally understood the collections a bit better. I am sharing my optimized functions here.

    My search full collection function is now O(n)
    My search key function is now O(log n)

    I am the admin. To contact me, send me an email to daniel@blackdtools.com
    Don't send pms to me! I rarely read pms. Just email me instead!

  4. #24
    Join Date
    Jun 2019
    Posts
    1

    Default

    any tips how read battle list?

Page 3 of 3 FirstFirst 123

Posting Permissions

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