Question: Programming 2 - Algorithm Analysis Q1 Algorithm Design (Please use detail) DungeonGator is a repository containing n*m books, each of which has a title length

Programming 2 - Algorithm Analysis Q1 Algorithm Design (Please use detail)

DungeonGator is a repository containing n*m books, each of which has a title length of at most t characters. All the books are stored in a 2-D container or collection, A[n][m] which has n rows and m columns. Each slot in the container contains a random book title. Thus the collection is not sorted and is purely random.

For example,

A[n][m] 0 ... m-1

0 pride and prejudice ... don quixote .

. . . . . . .

n-1 the great gatsby ... ulysses

Write a function using pseudocode or C++ code that takes in as input this repository and returns a new 1-D container with unique book titles. The returned repository must keep one copy of multiple repeated book titles. Note: You can assume that the input collection or container is a 2-D array. Other containers like vectors or lists are fine as long as you state what you are using.

Q2 Algorithm Analysis: (Please explain in detail)

Points Describe and justify the worst-case time and space complexity of your designed algorithm (the one you wrote in Q.1) in Big O notation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!