Answer:
The simple algorithm is described below
Step-by-step explanation:
assign all men and women as free
while some man m is free do
w = highest ranked women on m's list
if w is free
then m proposes w and m and w are engaged
else if w is not free and with m1
and if w picks m over m1
then w and m are engaged
free m1
end
output all the pairs