Design a stack which returns minimum element in constant time

Design a stack to support an additional operation which returns the minimum element from the stack in constant time. The stack should continue supporting all other operations like push, pop, top, size, empty, etc, with no degrade in performance for these operations.

Convert a multilevel linked list to a singly linked list

Given a multilevel linked list, convert it into a singly linked list in such a way that all nodes of first level appears first, followed by all nodes of second level, and so on. The multilevel linked list is similar to the simple linked list except that it has one extra field which points to …