# COIS 2020H S61 – For Brian Srivastava

COIS 2020H S61 – For Brian Srivastava

Questions 1 and 3 are programming questions and you should have a source file as well as testing documentation.
Assignments are to be done individually.
1.    a)  Write a program (including timing measurements) for the following scenario.  Generate 20 million random numbers, one at a time, and insert them into an array that doubles every time it runs out of space (starting size of 2), into an array that can hold 20 million elements from creation, and a linked list that can hold 20 million elements.  You should do this both for integers and floating point numbers.  (The numbers should be regular integers or floats).  Compare the time required for each of the six scenarios, and explain the differences.  You will need to write your own way to double an array size (it’s up to you how to do this), don’t use an ArrayList.

b) Do a brute force in order search through each of these to find the largest number.  Again, compare the timings for all 6 scenarios.

2.     You do not need to implement this, just describe the algorithm.
a)    Assume you have a robot with a light sensor and you want it to follow a trace (i.e. line) on the ground drawn with a thick marker.  Design 2 different algorithms to follow this line and compare their efficiency.  (The problem is a search one – if the line bends you need to find it again).  Describe/draw/illustrate some worst, or at least bad cases and best case scenarios for your algorithms.
b)    Consider the same problem but in 3 dimensions, e.g. a radar array (which produces something like a cone) searching through a sphere around an aircraft looking for incoming missiles or other aircraft.

3.    Attached to this assignment is a file titled “A1BoyNames.txt” it is 536 lines long, but some lines have two names separated by a comma.  Read in each name into a container structure of your choosing.
a.    Using a binary search, and a hash function of some sort attempt to find the names Brian, Bryan, Iain, Ian, and Stefan.

b.    Modify your program to search for partial matches (e.g. Bryant would match Bryan and Brian would match Ian).

This list was taken from http://www.world-english.org/boys_names_list.htm.  You can manipulate the source data however you want to make it easier to read in.

Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

## Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

### Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors: