若在掃描一網頁時,堆疊的操作依序為 push(<html>), push(<title>), pop(), push(<body>), push(<h1>), push(<font>), push(<size>), pop(),過程中無滿溢(overflow)發生,則此時堆疊最頂端(top)的內容為何?
A<html>
B<body>
C<font>正確答案
D<size>
答案與詳解
追蹤過程:[<html>]→[<html>,<title>]→pop 掉 <title>→[<html>]→加入 <body>,<h1>,<font>,<size>→最後 pop 掉 <size>,頂端剩 <font>。
