EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
C语言代写
您的位置: 主页 > 编程案例 > C语言代写 >
代写C语言:cs c++代写 Hash table with linear probing - C语言代写
发布时间:2021-07-25 19:39:09浏览次数:
C++ Implementation of Hash table with linear probing (worth 10%, due Nov 4th 23:59PM, late submissions not accepted)csc++代写1 TaskDescriptioncsc++代写 代写案例You are asked to use C++ toimplement• Hash table with linearprobing2 SubmissionGuidelineYou must follow this guideline! Your submission will be marked automatically. Failure to follow this guideline will result in 0.Your submission should contain exactly one file: main.cppYou do not need to submit adesign.Youareaskedtoimplementaveryspecifichashtable.Thekeysarelower-caseEnglishwords(e.g.,apple, pear). The length of a key is at most 10. The hash function is “simply using the last character”. That is, thehashvalueofappleshouldbee,andthehashvalueofpearshouldber.Your hashtablecontainsexactly 26 slots (hash value a to hash value z). The total number of English words/keys you need to deal with is at most 26, so the table is never toosmall.A table slot has three different statuses: “never used”, “tombstone”, and “occupied”. Table starts with  26 “never used”slots.Searching works as follows: given a key, take its last character as the  hash  value.  First  try  the  corre- sponding table slot,  if the objective key is there,  then you have  found it.  If the corresponding slot is never       used, terminate because we  are certain that the objective is not in the table.  If the slot is occupied but it’s         not the objective, or the slot is a “tombstone”, then we  move  on to the next slot (may need to wrap around       the table if the current slot is the last one).  We  keep trying until we  either find the key or are certain that            thekeydoesnotexistinthetable.Insertion works as follows: First perform searching to  ensure  that the  key  does  not  exist.  If  it already  exists,  then do nothing.  If it does not,  take the last character of a key as the hash value.  If the corresponding    table slot is not occupied (either “never used” or “tombstone”), put the key there (the slot is now occupied).   If the corresponding slot is already occupied,  try the  next  slot.  Repeat  trying  until  you  find  an  unoccupied slot.Deletion works as follows: given a key, use the searching process to locate its slot. (If the key is not in the table, then do nothing.) Once you find the key, change the slot status to “tombstone”.You should start your program by initializing an empty hash table. Your program takes one line as input. The input line contains n “modification moves” separated by spaces (1 n 26). The available modification moves areAWord (Character A followed by a lower-case English word of length at most 10): Aapple means insert key apple into the hash table. If apple is already in the table, do nothing.DWord (Character D followed by a lower-case English word of length at most 10): Dapple means delete key apple from the hash table. If apple is not in the tree, do nothing. At the end, you need to go through the slots from a to z, and output all the keys separated by space. You don’t need to worry about invalid inputs.Sample input 1: Aaaa Accc Abbb Sample output 1:  aaa bbb ccc Sample input 2: Abba Aaaa Acca Sample output 2:  bba aaa cca Sample input 3: Abba Aaaa Acca Daaa Sample output 3: bba cca 3 MarkingMarking will be done automatically. There are 100 test cases. 4 SVN InstructionsFirst of all, you need to create a directory under version control:svn mkdir parents -m Creating ADSA Assignment 3 folder https://version-control.adelaide.edu.au/svn/aXXXXXXX/2018/s2/adsa/assignment3/aXXXXXXX should be your student ID. The directory path needs to be exactly “2018/s2/adsa/assignmentK”, where “K” is the assignment number. To check out a working copy, typesvn checkout https://version-control.adelaide.edu.au/svn/aXXXXXXX/2018/s2/adsa/assignment3/ adsa-18-s2-assignment3/ cd adsa-18-s2-assignment3svn add main.cppCommit the files to SVN:svn commit -m Adding ADSA assignment 3 main.cpp SVN helps keeping track of file changes (over different commits). You should commit your work early and often. 5 WebsubmissionYou are asked to submit via the web interface https://cs.adelaide.edu.au/services/websubmission/. The submission steps should be self-explanatory.  Simply choose the correct semester,  course,  and assignment.   The websubmission system will automatically fetch the latest version of your work from your SVN repository     (you may also choose to submit  older  versions).  Once  your  work  is  submitted,  the  system  will  launch  a  script checking the format of your submission.  Click “View Feedback”  to view the results.  Your  mark will      be calculated offline after the deadline.  You  are welcome to resubmit for as many times as you wish (before        the deadline).We will compile your code using g++ -o main.out -std=c++11 -O2 -Wall main.cpp. It is your re- sponsibility to ensure that your code compiles on the university system.1  1g++ has too many versions, so being able to compile on your laptop does not guarantee that it compiles on the universitysystem. You are encouraged to debug your code on a lab computer (or use SSH).最先出自315代写 cs代写 作业代写 代写c++ 代写c服务csc++代写合作:315代写

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。