Problem Description Learn Clojure In this problem, each person in the social network takes a specific time to send the message(time is an integer). A specific newbie in react(let's call him NB) wants to post a question to a ninja(let's call him NJ) on the network. Find out how long a specific message takes to reach NJ from NB. The social network is given as the input as follows. The first line is a number which is the number of people in the social network. The next following lines are the actual members of the social network whose names are written in separate lines. Following that is the number of connections, followed by a new line separated list of connections given as . Then on the next line is the person who wants to send the message(NB's id in our case) and on the next line is the person who is the intended recipient(NJ's id). The output should be a single line consisting of the time it takes to send the message through or -1 if the message can't be sent. INPUT FORMAT total members in ReactCommunity Network memberId1 MemberId2 MemberIdN W Total possible edges >

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
Problem Description
Learn Clojure
In this problem, each person in the social network takes a specific
time to send the message(time is an integer). A specific newbie in
react(let's call him NB) wants to post a question to a ninja(let's
call him NJ) on the network. Find out how long a specific
message takes to reach NJ from NB. The social network is given
as the input as follows. The first line is a number which is the
number of people in the social network. The next following lines
are the actual members of the social network whose names are
written in separate lines. Following that is the number of
connections, followed by a new line separated list of connections
given as <follower> <following> <time it takes to send the
message>. Then on the next line is the person who wants to send
the message(NB's id in our case) and on the next line is the
person who is the intended recipient(NJ's id).
The output should be a single line consisting of the time it takes
to send the message through or -1 if the message can't be sent.
INPUT FORMAT
total members in ReactCommunity Network
memberId1
MemberId2
MemberIdN
L
Total possible edges
<follower1> <following 1> <time taken to send the message
Transcribed Image Text:Problem Description Learn Clojure In this problem, each person in the social network takes a specific time to send the message(time is an integer). A specific newbie in react(let's call him NB) wants to post a question to a ninja(let's call him NJ) on the network. Find out how long a specific message takes to reach NJ from NB. The social network is given as the input as follows. The first line is a number which is the number of people in the social network. The next following lines are the actual members of the social network whose names are written in separate lines. Following that is the number of connections, followed by a new line separated list of connections given as <follower> <following> <time it takes to send the message>. Then on the next line is the person who wants to send the message(NB's id in our case) and on the next line is the person who is the intended recipient(NJ's id). The output should be a single line consisting of the time it takes to send the message through or -1 if the message can't be sent. INPUT FORMAT total members in ReactCommunity Network memberId1 MemberId2 MemberIdN L Total possible edges <follower1> <following 1> <time taken to send the message
Problem Description
Learn Clojure
In this problem, each person in the social network takes a specific
time to send the message(time is an integer). A specific newbie in
react(let's call him NB) wants to post a question to a ninja(let's
call him NJ) on the network. Find out how long a specific
message takes to reach NJ from NB. The social network is given
as the input as follows. The first line is a number which is the
number of people in the social network. The next following lines
are the actual members of the social network whose names are
written in separate lines. Following that is the number of
connections, followed by a new line separated list of connections
given as <follower> <following> <time it takes to send the
message>. Then on the next line is the person who wants to send
the message(NB's id in our case) and on the next line is the
person who is the intended recipient(NJ's id).
The output should be a single line consisting of the time it takes
to send the message through or -1 if the message can't be sent.
INPUT FORMAT
total members in ReactCommunity Network
memberId1
MemberId2
MemberIdN
L
Total possible edges
<follower1> <following 1> <time taken to send the message
Transcribed Image Text:Problem Description Learn Clojure In this problem, each person in the social network takes a specific time to send the message(time is an integer). A specific newbie in react(let's call him NB) wants to post a question to a ninja(let's call him NJ) on the network. Find out how long a specific message takes to reach NJ from NB. The social network is given as the input as follows. The first line is a number which is the number of people in the social network. The next following lines are the actual members of the social network whose names are written in separate lines. Following that is the number of connections, followed by a new line separated list of connections given as <follower> <following> <time it takes to send the message>. Then on the next line is the person who wants to send the message(NB's id in our case) and on the next line is the person who is the intended recipient(NJ's id). The output should be a single line consisting of the time it takes to send the message through or -1 if the message can't be sent. INPUT FORMAT total members in ReactCommunity Network memberId1 MemberId2 MemberIdN L Total possible edges <follower1> <following 1> <time taken to send the message
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

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