Question: - - Use C + + programming language. - - In this assignment, you must have separate interface and implementation files ( i . e
Use C programming language.
In this assignment, you must have separate interface and implementation files ie separate h and cpp files for your class. Your class name MUST BE HashTable and your file names MUST BE HashTable.h and HashTable.cpp You have to implement Subtaskcpp Subtaskcpp and Subtaskcpp to solve and test subtasks.Note that you may write additional classes in your solution. Your cpph pdf files, and Makefile which produces executables for each subtask.
You ARE NOT ALLOWED to use any data structure or algorithm related function from the C standard template library STL such as vector or any other external libraries.
Question points
Subtask
You are given unique strings. You want to know the number of pairs such that the string is either prefix or
suffix of the string and To make it clear, an example is given below.
Sample Output pairs.txt
Explanation:
ab is prefix of "abc" ab is prefix of "abcde"
ab is suffix of "cab" bc is suffix of "abc"
bc is prefix of "bcda" bc is prefix of "bca"
c is suffix of is suffix of
c is prefix of "cab" ef is suffix of "def"
Important:
If one is both prefix and suffix of another, you need to count it twice.
For example, a is both prefix and suffix of "aba". So you count it twice.
This homework MUST be done using hashing.
If you try to solve this question using data structures other than hash tables you will get from this part and FZ
from this course. You MUST implement your hash table using separate chaining.
To get a full credit your code must work correct and work in O totalnumberofcharacters
The name of the input file will be provided as a command line argument to your program. Thus, your program
should run using two command line arguments. Thus, the application interface is simple and given as follows:
username@dijkstra: subtask Explanation:
First pattern, bc occurs at and indices one based indexing
Second pattern, ab occurs at and
Third pattern, cd occurs at and
Forth pattern, bcc occurs at and
This subtask MUST be done using hashing.
You don't have to use separate chaining like previous subtask.
To get a full credit your code must work correct and work in totalnumberofcharacters
If you try to solve this question using data structures other than hash tables you will get from this part and FZ
from this course.
The name of the input file will be provided as a command line argument to your program. Thus, your program
should run using two command line arguments. Thus, the application interface is simple and given as follows:
username@dijkstra: subtask The size of the minimal subset is Minimal subset can be either "abcde" or "edcba" and its size is You need to
have one reverse operation on "abcde" to make it equal to "edcba" or vice versa.
line
Explanation:
The size of the minimal subset is Minimal subset can be "baaa", bcd
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
