notes return( )boolean empty(/checks if the stack is empty boolean empty falseif(stack top =- empty true else empty falsereturn(empty)void initialise(/this procedure initializes the stack stack top - the above implementation strategy is easy and fast since it does not have run-time overheads at the same time it is not flexible since it cannot handle situation when the number of elements exceeds max_size alsolet us sayif max_size is derided statically to and stack actually has only elementsthen memory space for the rest of the elements would be wasted task write syntax to declare array in program pointer-based implementation here the memory is used dynamically for every push operationthe memory space for one element is allocated at run-time and the element is inserted into the stack for every pop operationthe memory space for the deleted element is de-allocated and returned to the free space pool hence the shortcomings of the array-based implementation are overcome but sincethis allocates memory dynamicallythe execution is slowed down the stack is implemented as linked list as shown in figure figure implementation of stack using linked list top - nil the following pseudo-code is for the pointer-based implementation of stack each element of the stack is of type struct stk elementlovely professional university