Linked list implementation as a stack and queue, can i do the same as in linked list program?

can i write the same program with
1)push=insertatfirst
2)pop=insertatlast
1 answer 1