Lab 3 - Binary Insertion Sort
- Open your homework 2 program in IntelliJ (or other IDE, so
that it can be modified).
- If there are no references to the sources you have used, add
them as a comment at the beginning of the code.
- If you do not have the latest version of your work on
the bitbucket (or github), create a commit "Before lab"
and upload (push) it. DO THIS BEFORE STARTING THE LAB
ASSIGNMENT. If necessary, see the materials of the first lab.
- The teacher will assign you a partner for this lab.
- Open the last submission of your program in Moodle and show
the time of submission and the lecturer's latest comments on the
work (must contain "ok"). NB! all the automated tests must pass,
sources of information must be referenced. Also open and show
the graph of the measurement results (in Moodle), submission
time and comments (must contain "ok").
- Explain your solution to the partner. Compare the running
times with the partner. The partner does the same.
- Work with your partner to find and implement a third
version of the binary insertion sort method that is
different from both of the versions you've
submitted. Possible implementations:
- binary search by loop directly inside the
sorting method
- binary search using a separate recursive
method
- binary search using a separate
non-recursive method
- using Arrays.binarySearch
- ...
- Test the new solution and compare it with your previous
solution in terms of speed (both partners). Put together in
one computer all three methods (your method, partner's
method and the new method) for creating a new table and a new
graph.
- Make a new commit "Cooperation with Partner Name" and
upload (push) it to bitbucket (or github), the partner will do
the same with her code.
- Show this last commit, your program and the new comparison
table/graph to the teacher.
- The teacher will discuss and ask questions about the speed of
various variants.
- The teacher inputs grades to SIS.
Jaanus Pöial