Add stack/queue implemented by list.