Deque API

用ArrayDeque Class

Method Insert First

API 1 : addFirst(E e)

API 2: offerFirst(E e)

Method Insert Last

API 3 : addLast(E e)

API 4: offerLast(E e)

Method Remove First

API 5: removeFirst()

API 6: pollFirst()

Method Remove Last

API 7: removeLast()

API 8: pollLast()

Method Retrieve First

API 9: getFirst()

API 10: peekFirst()

Method Retrieve Last

API 11: getLast()

API 12: peekLast()

用LinkedList Class

insert

  • api不同,只有在blackstack才能测试出不同

remove

  • 区分只有有没有拿出null在用class的时候

  • 两组的api不同的,是返回null/exception

receive

  • 两组的api不同的,是返回null/exception?

Last updated