Question: Devise and divide and conquer alogrithm and write psuedo code for the problem below... A party of n guests, with one celebrity actor there, is
Devise and divide and conquer alogrithm and write psuedo code for the problem below...
A party of n guests, with one celebrity actor there, is going on down the street. We define a celebrity as a guest whom all other guests know, yet who knows no other guests. Specifically, if guest ai is the celebrity, aj 6= ai , knows(aj , ai) == true and knows(ai , aj) == f alse. Other guests may or may not know each other, as normal parties go. Give a O(n) algorithm which determines who the celebrity is
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
