用链表实现栈,完成了出栈入栈功能. #include"stdio.h" typedef int element; //define a struct descirbe a stack used by linklist typedef struct Stack_linklist{ element data; struct Stack_linklist *next; }*Stack; //define a struct desribe a stack top number typedef…
LikedList: package Date_pacage; public class LinkedList<E> { public static void main(String[] args) { LinkedList<Integer> linkedList = new LinkedList<>(); for(int i = 0 ; i < 5 ; i ++) { linkedList.addFirst(i); System.out.println(link…