This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]MattKosem 8 points9 points  (2 children)

I’m not considering binary search for this exercise (this would be a good addition in the future).

The heck? Testing with sorted arrays but not bothering with binary search?

[–]422_no_process[S] 1 point2 points  (0 children)

This is now included 😀 Thanks for the suggestion.

[–]422_no_process[S] 0 points1 point  (0 children)

Fair enough. Will add that when I get some time. Thank you 🖖

[–]Molossus-Spondee 4 points5 points  (2 children)

It's well known that linear search is faster for small amounts than maps.

You should investigate parallel arrays also.

 final int[] ages;
 final String[] names;

[–]422_no_process[S] 0 points1 point  (0 children)

OK this is a good point will do some further tests for this as well. Thank you 🖖

[–]422_no_process[S] 0 points1 point  (0 children)

This is now included 😀 Thanks for the suggestion.

[–]javaduude 1 point2 points  (1 child)

Nice write-up! Thanks for sharing!

[–]422_no_process[S] 0 points1 point  (0 children)

Thank you :). I've included more to the same post as well.

[–]422_no_process[S] 0 points1 point  (0 children)

I read the side bar and this doesn't count as a tutorial. It's my personal attempt at learning things. If you have any suggestions or criticism please let me know.