python code. instructions are given within the quotation marks. 1) def get_misspelled_linear(dictionary, text): """ dictionary is a list of sorted words in the dictionary; you may assume all words in the dictionary are lower case and only contains a-z and apostrophe' text is a list of words from any given text. Use linear search to find the list of all misspelled words in text, a misspelled word is a word that is in the text but not in the dicionary. The comparison is case insensitive. For example if cat is in the dictionary, then CAT, cAt, cAT, cat and etc. are all considered to be valid word. Return the list of misspelled word. Your list of misspelled word must appear in the original order as they were in the text list and keep original form (upper/lower case) if dictionary has N words and text has K words, then the running time for this method will be O(NK) """ return []   2) def get_misspelled_binary(dictionary, text): """ dictionary is a list of sorted words in the dictionary; you may assume all words in the dictionary are lower case and only contains a-z and apostrophe' text is a list of words from any given text. Use binary search to find the list of all misspelled words in text, a misspelled word is a word that is in the text but not in the dicionary. The comparison is case insensitive. For example if cat is in the dictionary, then CAT, cAt, cAT, cat and etc. are all considered to be valid word. Return the list of misspelled word. Your list of misspelled word must appear in the original order as they were in the text list and keep original form (upper/lower case) if dictionary has N words and text has K words, then the running time for this method will be O(K*logN) """ return []   3) def get_misspelled_set(dictionary, text): """ dictionary is a list of sorted words in the dictionary; you may assume all words in the dictionary are lower case and only contains a-z and apostrophe' text is a list of words from any given text. Use search in a set to find the list of all misspelled words in text, a misspelled word is a word that is in the text but not in the dicionary. The comparison is case insensitive. For example if cat is in the dictionary, then CAT, cAt, cAT, cat and etc. are all considered to be valid word. Return the list of misspelled word. Your list of misspelled word must appear in the original order as they were in the text list and keep original form (upper/lower case) if dictionary has N words and text has K words, then the running time for this method will be O(N + K), where the O(N) is the time it takes to convert a list of N words to a set, and O(K) is the time it takes to search for K words in a set. """ return []

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

python code. instructions are given within the quotation marks.

1) def get_misspelled_linear(dictionary, text):
"""
dictionary is a list of sorted words in the dictionary; you may assume all
words in the dictionary are lower case and only contains a-z and apostrophe'
text is a list of words from any given text.
Use linear search to find the list of all misspelled words in text,
a misspelled word is a word that is in the text but not in the dicionary.
The comparison is case insensitive. For example if cat is in the dictionary,
then CAT, cAt, cAT, cat and etc. are all considered to be valid word.
Return the list of misspelled word.
Your list of misspelled word must appear in the original order as they were in
the text list and keep original form (upper/lower case)
if dictionary has N words and text has K words, then the running time for this
method will be O(NK)
"""
return []

 

2) def get_misspelled_binary(dictionary, text):
"""
dictionary is a list of sorted words in the dictionary; you may assume all
words in the dictionary are lower case and only contains a-z and apostrophe'
text is a list of words from any given text.
Use binary search to find the list of all misspelled words in text,
a misspelled word is a word that is in the text but not in the dicionary.
The comparison is case insensitive. For example if cat is in the dictionary,
then CAT, cAt, cAT, cat and etc. are all considered to be valid word.
Return the list of misspelled word.
Your list of misspelled word must appear in the original order as they were in
the text list and keep original form (upper/lower case)
if dictionary has N words and text has K words, then the running time for this
method will be O(K*logN)
"""
return []

 

3) def get_misspelled_set(dictionary, text):
"""
dictionary is a list of sorted words in the dictionary; you may assume all
words in the dictionary are lower case and only contains a-z and apostrophe'
text is a list of words from any given text.
Use search in a set to find the list of all misspelled words in text,
a misspelled word is a word that is in the text but not in the dicionary.
The comparison is case insensitive. For example if cat is in the dictionary,
then CAT, cAt, cAT, cat and etc. are all considered to be valid word.
Return the list of misspelled word.
Your list of misspelled word must appear in the original order as they were in
the text list and keep original form (upper/lower case)
if dictionary has N words and text has K words, then the running time for this
method will be O(N + K), where the O(N) is the time it takes to convert a list
of N words to a set, and O(K) is the time it takes to search for K words in
a set.
"""
return []
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY