Hauv computer science, pawg yog cov ntaub ntawv paub daws teeb meem uas ua haujlwm los ntawm kev sau cov ntsiab lus, nrog ob txoj haujlwm tseem ceeb: Push, uas ntxiv cov ntsiab lus rau kev sau, thiab. Pop, uas tshem tawm cov ntsiab lus tsis ntev los no uas tseem tsis tau muab tshem tawm.
Push thiab pop yog dab tsi?
Hauv computer science, pawg yog hom ntaub ntawv paub daws teeb uas ua haujlwm raws li cov khoom sib sau, nrog rau ob txoj haujlwm tseem ceeb: Push, uas ntxiv cov khoom rau kev sau, thiab. Pop, uas tshem tawm cov ntsiab lus tsis ntev los no ntxiv uas tseem tsis tau muab tshem tawm.
txhais li cas los ntawm thawb thiab pop ntawm pawg?
Pushing ib yam ntawm pawg txhais tau tias " tso rau saum". Popping ib yam dab tsi los ntawm pawg txhais tau hais tias "kho sab saum toj 'yam'" tawm ntawm pawg. Kev siv yooj yim yog rau thim rov qab qhov kev txiav txim ntawm cov lus.
Dab tsi yog qhov sib txawv ntawm kev thawb thiab pop?
Qhov sib txawv tseem ceeb ntawm PUSH thiab POP yog lawv ua dab tsi nrog pawg PUSH yog siv thaum koj xav ntxiv cov ntawv nkag mus rau pawg thaum POP siv los tshem tawm cov ntawv nkag los ntawm nws. … Thawj tus mus rau hauv qab thiab koj tuaj yeem ntxiv lossis tshem tawm cov khoom nyob rau sab saum toj ntawm pawg.
Vim li cas thiaj hu ua thawb thiab pop?
Cov ntsiab lus PUSH thiab POP yuav yog siv los ntawm Tech Model Railroad Club Kuv xav tias qhov no yog keeb kwm. Tech Model Railroad Club yeej muaj feem cuam tshuam rau tus qauv tsim ntawm Digital Equipment Corporation's (DEC) PDP-6. PDP-6 yog ib lub tshuab thawj zaug uas muaj cov lus qhia taw qhia hauv kev kho vajtse.