SlideShare a Scribd company logo
1 of 29
CSCE 3110 Data Structures & Algorithms Summer 2019
1 of 12
Project 3 – Hopscotch Hash Table
Due: 11:59 PM on Friday, June 21, 2019
PROGRAM DESCRIPTION
In this C++ program, you will implement an efficient hopscotch
hash table that improves
on the classic linear probing algorithm. Specifically, you will
use a TABLE_SIZE = 17
and use the single hash function ℎ(�) = � mod
�����_����. You shall resolve
collisions using linear probing where the maximal length of the
probe sequence (i.e.,
distance away from the original hash location) is bound by the
hopscotch hash
algorithm where MAX_DIST = 4.
You shall support the following five operations that are menu
driven:
1. Insert Value
2. Delete Value
3. Search Value
4. Output Table
5. Exit Program
All data shall be entered through the console and consist of
integers. You may assume
valid data, though data may be out of range (i.e., zero, negative
integers or possibly out
of range of menu options). Your algorithm to find the next
available slot is bound by the
end of the table so that the linear probe sequence need not be
circular. In other words,
you do not need to wrap around beyond the last element of the
array to the first for
either the linear probe or the bound for the hopscotch algorithm.
For example, if the
user attempts to insert 33 which hashes to index position 16
(i.e., 33 %TABLE_SIZE) in
the array, but an element already exists at that location, the
insert will fail as there are
no more array locations beyond this to attempt to insert the
element.
You must keep an item array containing the elements as well as
an associated hop
array that indicates positions in the item array that are occupied
with items that hash to
the same value. You should also provide specific feedback to
the user on successful
operations or when an operation failed. The search should
utilize the hash value and
then perhaps a linear probe of MAX_DIST – 1 index locations,
but you should not
simply search the entire array to accomplish this operation. Be
sure to handle the case
that requires multiple hops (i.e., using recursion) to get the
value within the correct
range.
REQUIREMENTS
• Your code should be well documented in terms of comments.
For example, good
comments in general consist of a header (with your name,
course section, date,
and brief description), comments for each variable, and
commented blocks of
code.
• Your program will be graded based largely on whether it
works correctly on the
CSE machines (e.g., cse01, cse02, …, cse06), so you should
make sure that
your program compiles and runs on a CSE machine.
aemalki
aemalki
aemalki
aemalki
aemalki
aemalki
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
2 of 12
• You should contact your instructor if there is any question
about what is being
asked for.
• This is an individual programming assignment that must be the
sole work of the
individual student. Any instance of academic dishonesty will
result in a grade of
“F” for the course, along with a report filed into the Academic
Integrity Database.
SAMPLE OUTPUT (input in bold):
$ ./a.out
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 5
5 inserted at position 5.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 7
ERROR: Please select operation between 1 and 5, inclusively.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 6
6 inserted at position 6.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 22
22 inserted at position 7.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 23
23 inserted at position 8.
HOPSCOTCH HASH MENU:
1 - Insert Value
aemalki
aemalki
aemalki
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
3 of 12
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | | 0000 |
| 1 | | 0000 |
| 2 | | 0000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | 5 | 1010 |
| 6 | 6 | 1010 |
| 7 | 22 | 0000 |
| 8 | 23 | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | | 0000 |
| 16 | | 0000 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 39
39 inserted at position 6.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | | 0000 |
| 1 | | 0000 |
| 2 | | 0000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | 5 | 1110 |
| 6 | 39 | 0011 |
| 7 | 22 | 0000 |
| 8 | 23 | 0000 |
| 9 | 6 | 0000 |
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
4 of 12
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | | 0000 |
| 16 | | 0000 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 56
ERROR: Unable to insert 56 into Hash Table: Hopscotch Hash
Failed
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 3
Enter positive integer value to search for in Hopscotch Hash
Table: 39
39 found at position 6.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 2
Enter positive integer value to delete from Hopscotch Hash
Table: 6
6 deleted from position 9.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | | 0000 |
| 1 | | 0000 |
| 2 | | 0000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | 5 | 1110 |
| 6 | 39 | 0010 |
| 7 | 22 | 0000 |
| 8 | 23 | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
aemalki
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
5 of 12
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | | 0000 |
| 16 | | 0000 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 19
19 inserted at position 2.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 50
50 inserted at position 16.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 56
56 inserted at position 8.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | | 0000 |
| 1 | | 0000 |
| 2 | 19 | 1000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | 5 | 1111 |
| 6 | 39 | 0001 |
| 7 | 22 | 0000 |
| 8 | 56 | 0000 |
| 9 | 23 | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
aemalki
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
6 of 12
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | | 0000 |
| 16 | 50 | 1000 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: -5
Enter positive integer value to insert into Hopscotch Hash
Table: 16
ERROR: Unable to insert 16 into Hash Table: Linear Probe
Failed
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 5
Program terminated by user...
BONUS OPPORTUNITY:
• For those students who have completed all the requirements,
you may attempt to
add circular functionality to the linear probe (i.e., not just to the
end of the table)
for up to 15 bonus points.
• SAMPLE OUTPUT for BONUS showing circular table rolling
over (input in bold):
$ ./a.out
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 16
16 inserted at position 16.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 15
15 inserted at position 15.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
aemalki
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
7 of 12
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 33
33 inserted at position 0.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0000 |
| 1 | | 0000 |
| 2 | | 0000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | 15 | 1000 |
| 16 | 16 | 1100 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 50
50 inserted at position 1.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0000 |
| 1 | 50 | 0000 |
| 2 | | 0000 |
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
8 of 12
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | 15 | 1000 |
| 16 | 16 | 1110 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 32
32 inserted at position 16.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0000 |
| 1 | 50 | 0000 |
| 2 | 16 | 0000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | 15 | 1100 |
| 16 | 32 | 0111 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
aemalki
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
9 of 12
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 67
ERROR: Unable to insert 67 into Hash Table: Hopscotch Hash
Failed
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0000 |
| 1 | 50 | 0000 |
| 2 | 16 | 0000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | | 0000 |
| 15 | 15 | 1100 |
| 16 | 32 | 0111 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 14
14 inserted at position 14.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0000 |
| 1 | 50 | 0000 |
| 2 | 16 | 0000 |
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
10 of 12
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | 14 | 1000 |
| 15 | 15 | 1100 |
| 16 | 32 | 0111 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 31
ERROR: Unable to insert 31 into Hash Table: Hopscotch Hash
Failed
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0000 |
| 1 | 50 | 0000 |
| 2 | 16 | 0000 |
| 3 | | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | 14 | 1000 |
| 15 | 15 | 1100 |
| 16 | 32 | 0111 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
aemalki
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
11 of 12
4 - Output Table
5 - Exit Program
Enter operation to perform: 1
Enter positive integer value to insert into Hopscotch Hash
Table: 17
17 inserted at position 3.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0001 |
| 1 | 50 | 0000 |
| 2 | 16 | 0000 |
| 3 | 17 | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | 14 | 1000 |
| 15 | 15 | 1100 |
| 16 | 32 | 0111 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 2
Enter positive integer value to delete from Hopscotch Hash
Table: 32
32 deleted from position 16.
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 4
HOPSCOTCH HASH TABLE:
+------------------+
| # | item | hop |
+------------------+
| 0 | 33 | 0001 |
| 1 | 50 | 0000 |
| 2 | 16 | 0000 |
aemalki
aemalki
CSCE 3110 Data Structures & Algorithms Summer 2019
12 of 12
| 3 | 17 | 0000 |
| 4 | | 0000 |
| 5 | | 0000 |
| 6 | | 0000 |
| 7 | | 0000 |
| 8 | | 0000 |
| 9 | | 0000 |
| 10 | | 0000 |
| 11 | | 0000 |
| 12 | | 0000 |
| 13 | | 0000 |
| 14 | 14 | 1000 |
| 15 | 15 | 1000 |
| 16 | | 0111 |
+------------------+
HOPSCOTCH HASH MENU:
1 - Insert Value
2 - Delete Value
3 - Search Value
4 - Output Table
5 - Exit Program
Enter operation to perform: 5
Program terminated by user...
SUBMISSION:
• You will electronically submit your source code file(s) and a
README file where
you explain all of the information for the grader to properly
grade your program
(e.g., how to compile it, how to run it, etc.) to the Project 3
dropbox in Canvas by
the due date. Also submit a screen-shot (or use the “script”
command) of your
program running. Be sure to include your name in each program
file and in the
README file.
• Note that this program should be done individually. The
program will be checked
using a code plagiarism tool against other solutions, so please
be sure that all
work submitted is your own.
aemalki
aemalki
aemalki
aemalki
aemalki
ASS 6
In this Assignment, you will build on the knowledge you gained
while completing the Discussion Board requirement. At this
time, you will perform a textual analysis of protest songs. To
complete this Assignment, you must choose one protest song
from the 1960s and one protest song from within the last 5
years. For each song, locate at least three themes and then
compare/contrast these themes. The Assignment must be four
pages long, including the title page, content pages, and works
cited page.
1. Choose one protest song from the 1960s and one protest song
from today. Locate the lyrics for each song and provide the
complete lyrics in an appendix to your Assignment or in a
separate file. Cite the songs and lyrics using APA style.
2. Locate at least three themes in each song. Compare and
contrast these themes using quotes from the lyrics to illustrate
each theme.
3. Summarize your findings in a concluding paragraph.
Rubric: 6
Grade:
Grading Criteria
A: 81-90 points
· Essay identifies at least three themes in each chosen protest
song.
· Essay provides thoughtful commentary to illustrate each
theme.
· Identified themes are clearly compared and contrasted between
the
two time periods.
· Essay is clearly written and meets the posted length
requirements.
• Complete song lyrics are included and cited using APA style.
B: 72-80 points
· Essay identifies at least three themes in each chosen protest
song.
· Essay provides thoughtful commentary to illustrate each
theme.
· Essay provides a weak comparison of the themes across the
two
time periods.
· One of the three required parts is missing from the essay.
· Essay meets the posted length requirements.
· Complete song lyrics are included and cited using APA style.
C: 63-71 points
· Essay identifies less than three themes in each chosen protest
song.
· Essay provides little commentary to illustrate each theme.
· One or more of the three required parts is missing from the
essay.
· Essay does not meet posted length requirements.
· Essay uses no supporting sources.
· Essay does not include complete song lyrics.
D: 54-62 points
· Essay is only partially on topic, lacks originality, and vaguely.
mentions the assignment topic.
· Essay does not meet posted length requirements.
F: 0-53 points
· Essay is off topic and lacks originality.
· Essay makes little or no references to assignment questions.
· Essay does not meet posted length requirements.
· Essay contains extensive plagiarized text= graded as zero.
5% or up to 8 points are deducted from your assignment for
grammatical, incorrect or missing APA formatting and citations,
typographic or word usage problems.
CSCE 3110 Data Structures & Algorithms Summer 2019   1 of .docx

More Related Content

Similar to CSCE 3110 Data Structures & Algorithms Summer 2019 1 of .docx

Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020Adhi Wikantyoso
 
Kaitie Watson Lab 2 2013
Kaitie Watson Lab 2 2013Kaitie Watson Lab 2 2013
Kaitie Watson Lab 2 2013Kaitie Watson
 
222066369 clad-study-guide
222066369 clad-study-guide222066369 clad-study-guide
222066369 clad-study-guidehomeworkping9
 
How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...DataWorks Summit/Hadoop Summit
 
Project on Electronic Spreadsheets for Students
Project on Electronic Spreadsheets for StudentsProject on Electronic Spreadsheets for Students
Project on Electronic Spreadsheets for StudentsPramodSingh874369
 
Stack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADTStack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADTSoumen Santra
 

Similar to CSCE 3110 Data Structures & Algorithms Summer 2019 1 of .docx (9)

Stack.pptx
Stack.pptxStack.pptx
Stack.pptx
 
Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020
 
Kaitie Watson Lab 2 2013
Kaitie Watson Lab 2 2013Kaitie Watson Lab 2 2013
Kaitie Watson Lab 2 2013
 
222066369 clad-study-guide
222066369 clad-study-guide222066369 clad-study-guide
222066369 clad-study-guide
 
How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...How to understand and analyze Apache Hive query execution plan for performanc...
How to understand and analyze Apache Hive query execution plan for performanc...
 
Arrays and its properties IN SWIFT
Arrays and its properties IN SWIFTArrays and its properties IN SWIFT
Arrays and its properties IN SWIFT
 
Project on Electronic Spreadsheets for Students
Project on Electronic Spreadsheets for StudentsProject on Electronic Spreadsheets for Students
Project on Electronic Spreadsheets for Students
 
Unit viii searching and hashing
Unit   viii searching and hashing Unit   viii searching and hashing
Unit viii searching and hashing
 
Stack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADTStack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADT
 

More from mydrynan

CSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docxCSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docxmydrynan
 
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docxCSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docxmydrynan
 
CSI Paper Grading Rubric- (worth a possible 100 points) .docx
CSI Paper Grading Rubric- (worth a possible 100 points)   .docxCSI Paper Grading Rubric- (worth a possible 100 points)   .docx
CSI Paper Grading Rubric- (worth a possible 100 points) .docxmydrynan
 
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docxCSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docxmydrynan
 
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docxCSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docxmydrynan
 
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018  Ho.docxCSE422 Section 002 – Computer Networking Fall 2018  Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docxmydrynan
 
CSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docxCSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docxmydrynan
 
CSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docxCSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docxmydrynan
 
CSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docxCSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docxmydrynan
 
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docxCSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docxmydrynan
 
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docxCryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docxmydrynan
 
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docxCSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docxmydrynan
 
CSCE 1040 Homework 2 For this assignment we are going to .docx
CSCE 1040 Homework 2  For this assignment we are going to .docxCSCE 1040 Homework 2  For this assignment we are going to .docx
CSCE 1040 Homework 2 For this assignment we are going to .docxmydrynan
 
CSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docxCSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docxmydrynan
 
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docxCSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docxmydrynan
 
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docxCSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docxmydrynan
 
CSC-321 Final Writing Assignment In this assignment, you .docx
CSC-321 Final Writing Assignment  In this assignment, you .docxCSC-321 Final Writing Assignment  In this assignment, you .docx
CSC-321 Final Writing Assignment In this assignment, you .docxmydrynan
 
Cryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docxCryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docxmydrynan
 
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docxCSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docxmydrynan
 
Cryptography KeysCryptography provides confidentiality, inte.docx
Cryptography KeysCryptography provides confidentiality, inte.docxCryptography KeysCryptography provides confidentiality, inte.docx
Cryptography KeysCryptography provides confidentiality, inte.docxmydrynan
 

More from mydrynan (20)

CSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docxCSIA 413 Cybersecurity Policy, Plans, and Programs.docx
CSIA 413 Cybersecurity Policy, Plans, and Programs.docx
 
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docxCSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
CSIS 100CSIS 100 - Discussion Board Topic #1One of the object.docx
 
CSI Paper Grading Rubric- (worth a possible 100 points) .docx
CSI Paper Grading Rubric- (worth a possible 100 points)   .docxCSI Paper Grading Rubric- (worth a possible 100 points)   .docx
CSI Paper Grading Rubric- (worth a possible 100 points) .docx
 
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docxCSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
CSIA 413 Cybersecurity Policy, Plans, and ProgramsProject #4 IT .docx
 
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docxCSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
CSI 170 Week 3 AssingmentAssignment 1 Cyber Computer CrimeAss.docx
 
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018  Ho.docxCSE422 Section 002 – Computer Networking Fall 2018  Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
 
CSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docxCSCI  132  Practical  Unix  and  Programming   .docx
CSCI  132  Practical  Unix  and  Programming   .docx
 
CSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docxCSCI 714 Software Project Planning and EstimationLec.docx
CSCI 714 Software Project Planning and EstimationLec.docx
 
CSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docxCSCI 561Research Paper Topic Proposal and Outline Instructions.docx
CSCI 561Research Paper Topic Proposal and Outline Instructions.docx
 
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docxCSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
CSCI 561 DB Standardized Rubric50 PointsCriteriaLevels of .docx
 
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docxCryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
CryptographyLesson 10© Copyright 2012-2013 (ISC)², Inc. Al.docx
 
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docxCSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
CSCI 352 - Digital Forensics Assignment #1 Spring 2020 .docx
 
CSCE 1040 Homework 2 For this assignment we are going to .docx
CSCE 1040 Homework 2  For this assignment we are going to .docxCSCE 1040 Homework 2  For this assignment we are going to .docx
CSCE 1040 Homework 2 For this assignment we are going to .docx
 
CSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docxCSCE509–Spring2019Assignment3updated01May19DU.docx
CSCE509–Spring2019Assignment3updated01May19DU.docx
 
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docxCSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
CSCI 2033 Elementary Computational Linear Algebra(Spring 20.docx
 
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docxCSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
CSCI 340 Final Group ProjectNatalie Warden, Arturo Gonzalez, R.docx
 
CSC-321 Final Writing Assignment In this assignment, you .docx
CSC-321 Final Writing Assignment  In this assignment, you .docxCSC-321 Final Writing Assignment  In this assignment, you .docx
CSC-321 Final Writing Assignment In this assignment, you .docx
 
Cryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docxCryptography is the application of algorithms to ensure the confiden.docx
Cryptography is the application of algorithms to ensure the confiden.docx
 
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docxCSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
CSc3320 Assignment 6 Due on 24th April, 2013 Socket programming .docx
 
Cryptography KeysCryptography provides confidentiality, inte.docx
Cryptography KeysCryptography provides confidentiality, inte.docxCryptography KeysCryptography provides confidentiality, inte.docx
Cryptography KeysCryptography provides confidentiality, inte.docx
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 

CSCE 3110 Data Structures & Algorithms Summer 2019 1 of .docx

  • 1. CSCE 3110 Data Structures & Algorithms Summer 2019 1 of 12 Project 3 – Hopscotch Hash Table Due: 11:59 PM on Friday, June 21, 2019 PROGRAM DESCRIPTION In this C++ program, you will implement an efficient hopscotch hash table that improves on the classic linear probing algorithm. Specifically, you will use a TABLE_SIZE = 17 and use the single hash function ℎ(�) = � mod �����_����. You shall resolve collisions using linear probing where the maximal length of the probe sequence (i.e., distance away from the original hash location) is bound by the hopscotch hash algorithm where MAX_DIST = 4. You shall support the following five operations that are menu driven: 1. Insert Value 2. Delete Value 3. Search Value 4. Output Table 5. Exit Program All data shall be entered through the console and consist of integers. You may assume valid data, though data may be out of range (i.e., zero, negative
  • 2. integers or possibly out of range of menu options). Your algorithm to find the next available slot is bound by the end of the table so that the linear probe sequence need not be circular. In other words, you do not need to wrap around beyond the last element of the array to the first for either the linear probe or the bound for the hopscotch algorithm. For example, if the user attempts to insert 33 which hashes to index position 16 (i.e., 33 %TABLE_SIZE) in the array, but an element already exists at that location, the insert will fail as there are no more array locations beyond this to attempt to insert the element. You must keep an item array containing the elements as well as an associated hop array that indicates positions in the item array that are occupied with items that hash to the same value. You should also provide specific feedback to the user on successful operations or when an operation failed. The search should utilize the hash value and then perhaps a linear probe of MAX_DIST – 1 index locations, but you should not simply search the entire array to accomplish this operation. Be sure to handle the case that requires multiple hops (i.e., using recursion) to get the value within the correct range. REQUIREMENTS • Your code should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, course section, date,
  • 3. and brief description), comments for each variable, and commented blocks of code. • Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cse01, cse02, …, cse06), so you should make sure that your program compiles and runs on a CSE machine. aemalki aemalki aemalki aemalki aemalki aemalki aemalki aemalki
  • 4. CSCE 3110 Data Structures & Algorithms Summer 2019 2 of 12 • You should contact your instructor if there is any question about what is being asked for. • This is an individual programming assignment that must be the sole work of the individual student. Any instance of academic dishonesty will result in a grade of “F” for the course, along with a report filed into the Academic Integrity Database. SAMPLE OUTPUT (input in bold): $ ./a.out HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 5 5 inserted at position 5. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 7 ERROR: Please select operation between 1 and 5, inclusively. HOPSCOTCH HASH MENU:
  • 5. 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 6 6 inserted at position 6. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 22 22 inserted at position 7. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 23 23 inserted at position 8. HOPSCOTCH HASH MENU: 1 - Insert Value aemalki
  • 6. aemalki aemalki aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 3 of 12 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | | 0000 | | 1 | | 0000 | | 2 | | 0000 | | 3 | | 0000 | | 4 | | 0000 | | 5 | 5 | 1010 | | 6 | 6 | 1010 | | 7 | 22 | 0000 | | 8 | 23 | 0000 | | 9 | | 0000 |
  • 7. | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | | 0000 | | 16 | | 0000 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 39 39 inserted at position 6. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | | 0000 | | 1 | | 0000 | | 2 | | 0000 | | 3 | | 0000 | | 4 | | 0000 | | 5 | 5 | 1110 | | 6 | 39 | 0011 |
  • 8. | 7 | 22 | 0000 | | 8 | 23 | 0000 | | 9 | 6 | 0000 | aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 4 of 12 | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | | 0000 | | 16 | | 0000 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 56 ERROR: Unable to insert 56 into Hash Table: Hopscotch Hash Failed HOPSCOTCH HASH MENU:
  • 9. 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 3 Enter positive integer value to search for in Hopscotch Hash Table: 39 39 found at position 6. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 2 Enter positive integer value to delete from Hopscotch Hash Table: 6 6 deleted from position 9. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | | 0000 | | 1 | | 0000 | | 2 | | 0000 | | 3 | | 0000 | | 4 | | 0000 | | 5 | 5 | 1110 |
  • 10. | 6 | 39 | 0010 | | 7 | 22 | 0000 | | 8 | 23 | 0000 | | 9 | | 0000 | | 10 | | 0000 | aemalki aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 5 of 12 | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | | 0000 | | 16 | | 0000 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash
  • 11. Table: 19 19 inserted at position 2. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 50 50 inserted at position 16. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 56 56 inserted at position 8. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | | 0000 | | 1 | | 0000 | | 2 | 19 | 1000 |
  • 12. | 3 | | 0000 | | 4 | | 0000 | | 5 | 5 | 1111 | | 6 | 39 | 0001 | | 7 | 22 | 0000 | | 8 | 56 | 0000 | | 9 | 23 | 0000 | | 10 | | 0000 | | 11 | | 0000 | aemalki aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 6 of 12 | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | | 0000 | | 16 | 50 | 1000 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table
  • 13. 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: -5 Enter positive integer value to insert into Hopscotch Hash Table: 16 ERROR: Unable to insert 16 into Hash Table: Linear Probe Failed HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 5 Program terminated by user... BONUS OPPORTUNITY: • For those students who have completed all the requirements, you may attempt to add circular functionality to the linear probe (i.e., not just to the end of the table) for up to 15 bonus points. • SAMPLE OUTPUT for BONUS showing circular table rolling over (input in bold): $ ./a.out HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash
  • 14. Table: 16 16 inserted at position 16. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 15 15 inserted at position 15. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value aemalki aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 7 of 12 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash
  • 15. Table: 33 33 inserted at position 0. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | 33 | 0000 | | 1 | | 0000 | | 2 | | 0000 | | 3 | | 0000 | | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 | | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | 15 | 1000 | | 16 | 16 | 1100 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table
  • 16. 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 50 50 inserted at position 1. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | 33 | 0000 | | 1 | 50 | 0000 | | 2 | | 0000 | aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 8 of 12 | 3 | | 0000 | | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 |
  • 17. | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | 15 | 1000 | | 16 | 16 | 1110 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 32 32 inserted at position 16. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | 33 | 0000 | | 1 | 50 | 0000 | | 2 | 16 | 0000 | | 3 | | 0000 |
  • 18. | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 | | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | 15 | 1100 | | 16 | 32 | 0111 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value aemalki aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 9 of 12 4 - Output Table 5 - Exit Program
  • 19. Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 67 ERROR: Unable to insert 67 into Hash Table: Hopscotch Hash Failed HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | 33 | 0000 | | 1 | 50 | 0000 | | 2 | 16 | 0000 | | 3 | | 0000 | | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 | | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | | 0000 | | 15 | 15 | 1100 | | 16 | 32 | 0111 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value
  • 20. 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 14 14 inserted at position 14. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | 33 | 0000 | | 1 | 50 | 0000 | | 2 | 16 | 0000 | aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019 10 of 12 | 3 | | 0000 |
  • 21. | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 | | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | 14 | 1000 | | 15 | 15 | 1100 | | 16 | 32 | 0111 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 31 ERROR: Unable to insert 31 into Hash Table: Hopscotch Hash Failed HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+
  • 22. | 0 | 33 | 0000 | | 1 | 50 | 0000 | | 2 | 16 | 0000 | | 3 | | 0000 | | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 | | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | 14 | 1000 | | 15 | 15 | 1100 | | 16 | 32 | 0111 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value aemalki aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019
  • 23. 11 of 12 4 - Output Table 5 - Exit Program Enter operation to perform: 1 Enter positive integer value to insert into Hopscotch Hash Table: 17 17 inserted at position 3. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | 33 | 0001 | | 1 | 50 | 0000 | | 2 | 16 | 0000 | | 3 | 17 | 0000 | | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 | | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | 14 | 1000 | | 15 | 15 | 1100 | | 16 | 32 | 0111 |
  • 24. +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 2 Enter positive integer value to delete from Hopscotch Hash Table: 32 32 deleted from position 16. HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 4 HOPSCOTCH HASH TABLE: +------------------+ | # | item | hop | +------------------+ | 0 | 33 | 0001 | | 1 | 50 | 0000 | | 2 | 16 | 0000 | aemalki aemalki CSCE 3110 Data Structures & Algorithms Summer 2019
  • 25. 12 of 12 | 3 | 17 | 0000 | | 4 | | 0000 | | 5 | | 0000 | | 6 | | 0000 | | 7 | | 0000 | | 8 | | 0000 | | 9 | | 0000 | | 10 | | 0000 | | 11 | | 0000 | | 12 | | 0000 | | 13 | | 0000 | | 14 | 14 | 1000 | | 15 | 15 | 1000 | | 16 | | 0111 | +------------------+ HOPSCOTCH HASH MENU: 1 - Insert Value 2 - Delete Value 3 - Search Value 4 - Output Table 5 - Exit Program Enter operation to perform: 5 Program terminated by user... SUBMISSION: • You will electronically submit your source code file(s) and a README file where you explain all of the information for the grader to properly grade your program (e.g., how to compile it, how to run it, etc.) to the Project 3 dropbox in Canvas by the due date. Also submit a screen-shot (or use the “script”
  • 26. command) of your program running. Be sure to include your name in each program file and in the README file. • Note that this program should be done individually. The program will be checked using a code plagiarism tool against other solutions, so please be sure that all work submitted is your own. aemalki aemalki aemalki aemalki aemalki ASS 6 In this Assignment, you will build on the knowledge you gained while completing the Discussion Board requirement. At this time, you will perform a textual analysis of protest songs. To complete this Assignment, you must choose one protest song from the 1960s and one protest song from within the last 5 years. For each song, locate at least three themes and then compare/contrast these themes. The Assignment must be four
  • 27. pages long, including the title page, content pages, and works cited page. 1. Choose one protest song from the 1960s and one protest song from today. Locate the lyrics for each song and provide the complete lyrics in an appendix to your Assignment or in a separate file. Cite the songs and lyrics using APA style. 2. Locate at least three themes in each song. Compare and contrast these themes using quotes from the lyrics to illustrate each theme. 3. Summarize your findings in a concluding paragraph. Rubric: 6 Grade: Grading Criteria A: 81-90 points · Essay identifies at least three themes in each chosen protest song. · Essay provides thoughtful commentary to illustrate each theme. · Identified themes are clearly compared and contrasted between the two time periods. · Essay is clearly written and meets the posted length requirements. • Complete song lyrics are included and cited using APA style. B: 72-80 points · Essay identifies at least three themes in each chosen protest song. · Essay provides thoughtful commentary to illustrate each theme. · Essay provides a weak comparison of the themes across the
  • 28. two time periods. · One of the three required parts is missing from the essay. · Essay meets the posted length requirements. · Complete song lyrics are included and cited using APA style. C: 63-71 points · Essay identifies less than three themes in each chosen protest song. · Essay provides little commentary to illustrate each theme. · One or more of the three required parts is missing from the essay. · Essay does not meet posted length requirements. · Essay uses no supporting sources. · Essay does not include complete song lyrics. D: 54-62 points · Essay is only partially on topic, lacks originality, and vaguely. mentions the assignment topic. · Essay does not meet posted length requirements. F: 0-53 points · Essay is off topic and lacks originality. · Essay makes little or no references to assignment questions. · Essay does not meet posted length requirements. · Essay contains extensive plagiarized text= graded as zero. 5% or up to 8 points are deducted from your assignment for grammatical, incorrect or missing APA formatting and citations, typographic or word usage problems.