分享至
要怎麼使用兩個堆疊(stack)來做一個佇列(queue)的enqueue跟dequeue?順便算時間複雜度。
已邀請的邦友 {{ invite_list.length }}/5
[資料結構]用C語言製作堆疊(Stack)
google "c stack" 一堆範例解說
https://stackoverflow.com/questions/69192/how-to-implement-a-queue-using-two-stacks
https://stackoverflow.com/questions/34099279/how-to-implement-a-queue-with-two-stacks
IT邦幫忙