Question: Java Method write a static method ifSame() which takes 3 parameters. a) a matrix representing an adjacency matrix of twitter follows relationship b) an int

 Java Method write a static method ifSame() which takes 3 parameters.

Java Method

write a static method ifSame() which takes 3 parameters.

a) a matrix representing an adjacency matrix of twitter "follows" relationship

b) an int x representing a twitter user

c) an int y representing another twitter user.

the function returns the number of common followers of the 2 users x and y .

Fe. In the diagram below there are 5 users, tabelled 0.4. There is a directed edge between users i andjiff user i "follows" userj. One representation of this kind of graph can be a two-dimensional matrix A where. If the value at ADU is 1, there exists a directed edge between node i and nodej. This is called the adjacency matrix ro1001) 001 1 1 00000 00100 LO0010

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!