Consider the following statements for priority queue:
S1: It is a data structure in which the intrinsic ordering of the elements does determine the result of its basic operations.
S2: The elements of a priority queue may be complex structures that are ordered on one or several fields
Show the worked solution\(S_1\): in a priority queue the order in which elements leave is determined by their priorities (the intrinsic ordering of the elements), not by the order of arrival; this ordering decides what delete-min/max and similar operations return — correct.\(S_2\): elements may be records, with the priority taken from one or several fields (e.g. ordered by deadline, then by arrival time) — correct.Both statements are correct.Answer: D
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com