Abstract Data Types Stack, Queue Amortized analysis ADT is an interface It defines the type of the data stored operations, what each operation does (not how) parameters of…