I finished up Programming Assignment 1 for COMP319 today. I had to create Iterative and Recursive Search Algorithms. Specifically an iterative binary search, a recursive binary search, a variation of a binary search that splits the set not into two sets of (almost) equal sizes but into two sets of sizes one-third and two-thirds, a ternary serch that first tests the element at position n/3 for equality with some value of x, and then checks the element at 2n/3 and either discovers x or reduces the set size to one-third of the original, and a quadruple search that first tests the element at position n/4 for equality with some value of x, then checks the element at n/2, then at 3n/4 and either discovers x or reduces the set size to one-quarter of the original.
This is one of the harder assignments I’ve done for Franklin University so far, but I pulled it off. Well, at least the programming. The Order of Complexity shit I had to do for the report may be wrong but I know I’m close. I’ll just have to wait to see the grade.
I didn’t even get to the other COMP319 assignment that was due today. It’s only 20 points and I think the teacher accepts assignments anytime, so I’ll be turning that in tomorrow. :-P
Here’s the java program if you want to see what all that work amounts to: Download file.
Update: I got 100% on the assignment. The teacher also said turning in my other assignment one/two day(s) after the due date is ok as well. Happy Day.