Task 2.2 - Measure Sort and Search Timings

Now do some simple timing of array functions. For this refer to the java Arrays class API documentation, especially the methods binarysearch and sort or the equivalent for your language of choice.
  • Expand the RandomArray function by adding a method to sort the array (e.g. using the java Arrays class sort function) and to search for an integer in the array (e.g. using the binarysearch method). Note that for other languages you may have to code a suitable function yourself.
  • As for the creation, obtain timing results for the sort and search methods over varying array sizes to obtain the runtime behaviour and plot them. Use suitable arguments for the search to determine the worst case behaviour of the method.

Upload the graphs of your timing results here and in the text field state the time complexity those graphs indicate for the algorithms to show you have completed this task.