First things If you don't want to use array, LinkedList is better option as you can make it easily according to question (leaving array) with two operation
1. Insert At first, Delete at First and Top_FirstElement
2. Insert at last, Delete at last and top_lastElement
and using array:
int array[SIZE];
//access the same array by dividing its size by 2
topForward=SIZE/2+1;
function ForwardElementPush(topForward, InputValue){
if(top<=SIZE)
set topForward=top+1;
array[topForward]=InputValue;
}
topBackward=SIZE/2;
function BackwardElementPush(topBackward,InputValue){
if(topBackward!=-1)
topBackward--;
array[topBackward]=InputValue;
}