Home Page > > Details

CSCI-1200 AssignmentHelp With ,Data Structures Assignment ,Python,Java,c/c++ Programming AssignmentHelp With R Programming| C/C++ Programming

CSCI-1200 Data Structures — Spring 2020
Homework 9 — IMDB Search
The Internet Movie Database (IMDB) keeps track of data related to films.
Your program will take input from std::cin which constitutes a list of commands. Some of these commands
will describe how your hash table for the assignment will work, and other commands will request output to
std::cout.
The goal is to write our own simple search engine for movie data. In a search, we may have exact information,
or we may only have partial information (more on this later). In order to make our search time-efficient we
will use extra memory in our hash table to store more “keys”.
Movie Data
When your program receives the movies command, it will be given a filename to read from. Each entry in
the file will look like:
Title
Year of Release
Runtime in Minutes
GenreCount GenreList
ActorCount ActorList
RoleCount RoleList
There will be no spaces in any of the data, for example instead of “John Wayne” we would have “John Wayne”.
None of the fields will be blank, and GenreCount, ActorCount, RoleCount will all be ≥ 1. GenreList will
have GenreCount entries, ActorList will have ActorCount entries, and RoleList will have RoleCount
entries. Refer to the sample for more concrete examples.
One strange thing about the data is that instead of the actors having names, they all have strings starting
with “n” which we will refer to as “nconsts”. This is because there might be two actors with the same name,
so we instead use a unique identifier. However, there is another command actors which also gives a filename.
The structure of the actors file is much simpler with each line consisting of:
nconst ActorName
The third major operation is query. After the word query your program can expect input that looks like
an entry from the movie file. However, it is also possible to have unknown values. If the title, runtime, or
year are “?” it means that they are a wildcard and will match any movie. If the GenreCount, ActorCount
or RoleCount are 0, it means they are a wildcard and will match any movie. When your program receives
a query, it should search the hash table (more on that in a moment) and return all results that match. In
order for two GenreLists, ActorLists, or RoleLists to match, they must have the same number of values,
every value must match, and the values must be in the same order.
Choice of Hash Function and Table Implementation
The choice of the hash function is up to you. A good hash function should be fast, O(1) computation, and
provide a random, uniform distribution of keys throughout the table. You may use one of the hash functions
mentioned in lecture, one found on the internet, or one of your own devising. If you choose to download a
hash function from the internet, you must provide the URL in your README and include the source code
with your submission. If the downloaded file requires a copyright notice, you MUST include that notice. Be
sure to observe any copyright restrictions on the use of the code. In your README file, describe your hash
function and table implementation.
You may write as many classes as you feel are necessary, however you must have exactly one hash table and the
representation must be a vector

Contact Us - Email:99515681@qq.com    WeChat:codinghelp
Programming Assignment Help!