17
BoomeH
8y

First try at threads in java, search algorithm improved by 35% (56sec to 36sec). Pretty cool to learn 😊

Comments
  • 3
    56 sec wtf are you sorting, a list of trucks?
    (kidding good job & keep up the good work)
  • 1
    @achehab haha, yes, big, big trucks. No, I'm comparing a list of 2500 entries to another list of 2500 entries, to see if there are any differences (an entry in the first list that doesn't exist in the new one). If there is a difference, I'm checking if there's a partial match. If there's no match whatsoever I mark it as not existing at all
  • 0
    @BoomeH please tell me these lists are sorted
  • 0
    @mostlyharmless Hm, I haven't been coding for that long, what do you mean by sorted lists? I read the entries from two textfiles through a BufferedReader
  • 2
    @BoomeH if the lists are sorted the checks you describe would be O(n)...
  • 0
    @danislu Okay, thanks for the feedback! Do you have a text/link that explains sorted lists and the O(n)?
  • 3
    @BoomeH sure 😀 http://bigocheatsheet.com talks about the complexities of different algorithms and stuff, a usefull resource
  • 3
    @danislu Guess I have some reading to do lol, will pick up a DS&A book listed on the site right away. Thanks for the tip! 😊
Add Comment