You are given a stack with n integers. You need to delete floor(n/2) elements from the bottom of the stack and print the remaining elements of the stack. The remaining elements should be printed in the order that they are inserted into the stack.
floor(3.5) will give the output as 3, greatest integer less than or equal to the input.
Example:
Stack(bottom -> top) = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
Output: [7, 8, 9, 10, 11, 12]
Stack = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Output: [6, 7, 8, 9, 10, 11]
Experienced Software Engineer with a demonstrated history of working in the computer software industry. Strong engineering professional skilled in Requirements Analysis, and Java Management.