Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
Bartleby Related Questions Icon

Related questions

Question

tyjtyjy

Code in Haskell Programming only
Space X is planning to start Star link. Programmers at SpaceX
are having trouble to implement wildcard pattern matching
supporting only the wildcard '?'. The wildcard character '?' can
be substituted by any single lower case English letter for
matching. He has two strings X and Y of equal length, made up
of lower case letters and the character '?'. He wants to know
whether the strings X and Y can be matched or not.
The first line of input contain an integer T denoting the number
of test cases. Each test case consists of two lines, the first line
contains the string X and the second contains the string Y.
For each test case, output a single line with the word Elon if the
strings can be matched, otherwise output Musk.
Input:
Output:
2
Elon
s?or?
Musk
sco??
stor?
sco??
expand button
Transcribed Image Text:Code in Haskell Programming only Space X is planning to start Star link. Programmers at SpaceX are having trouble to implement wildcard pattern matching supporting only the wildcard '?'. The wildcard character '?' can be substituted by any single lower case English letter for matching. He has two strings X and Y of equal length, made up of lower case letters and the character '?'. He wants to know whether the strings X and Y can be matched or not. The first line of input contain an integer T denoting the number of test cases. Each test case consists of two lines, the first line contains the string X and the second contains the string Y. For each test case, output a single line with the word Elon if the strings can be matched, otherwise output Musk. Input: Output: 2 Elon s?or? Musk sco?? stor? sco??
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Text book image
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Text book image
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Text book image
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Text book image
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Text book image
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY