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 Total possible edges

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
MemberIdN
Total possible edges
<follower1> <following 1> <time taken to send the message>>
<follower2> <following2> <time taken to send the message>
<followerN> <followingN> <time taken to send the message>
Follower(NB)
Following (NJ)
OUTPUT FORMAT
Shortest Time A takes to reach B
Sample Input
2
5
7
6
4
292
723
797
951
7
9
Sample Output
5
Transcribed Image Text:MemberIdN Total possible edges <follower1> <following 1> <time taken to send the message>> <follower2> <following2> <time taken to send the message> <followerN> <followingN> <time taken to send the message> Follower(NB) Following (NJ) OUTPUT FORMAT Shortest Time A takes to reach B Sample Input 2 5 7 6 4 292 723 797 951 7 9 Sample Output 5
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Introduction to classical planning
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education