1.

What is the efficiency of Gale-Shapley algorithm used in stable marriage problem?(a) O(N)(b) O(N log N)(c) O(N^2)(d) O(log N)The question was asked during an interview for a job.This key question is from Matching in portion Matching of Data Structures & Algorithms II

Answer»

Right OPTION is (c) O(N^2)

Easiest explanation - The TIME efficiency of Gale-Shapley algorithm is MATHEMATICALLY FOUND to be O(N^2) where N denotes stable MARRIAGE problem.



Discussion

No Comment Found

Related InterviewSolutions