标签:return tac list ast linked sem 链表实现 efi ack
原理:链表功能强大,可在头或尾进行插入和删除。
public class ListToStack {
LinkedList<Integer> linkedList = new LinkedList<>();
public void add(int value){
linkedList.addLast(value);
}
public int remove(){
return linkedList.removeFirst();
}
public int peek(){
return linkedList.getFirst();
}
public boolean isEmpty(){
return linkedList.isEmpty();
}
}
总结:懂链表结构,so easy~
标签:return tac list ast linked sem 链表实现 efi ack
原文地址:https://www.cnblogs.com/liuwentao/p/9452341.html