![數(shù)據(jù)結(jié)構(gòu)(全英文)智慧樹知到期末考試答案2024年_第1頁](http://file4.renrendoc.com/view14/M01/2D/14/wKhkGWYnZM2AB_dNAAIu5eUwRVk979.jpg)
![數(shù)據(jù)結(jié)構(gòu)(全英文)智慧樹知到期末考試答案2024年_第2頁](http://file4.renrendoc.com/view14/M01/2D/14/wKhkGWYnZM2AB_dNAAIu5eUwRVk9792.jpg)
![數(shù)據(jù)結(jié)構(gòu)(全英文)智慧樹知到期末考試答案2024年_第3頁](http://file4.renrendoc.com/view14/M01/2D/14/wKhkGWYnZM2AB_dNAAIu5eUwRVk9793.jpg)
下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
數(shù)據(jù)結(jié)構(gòu)(全英文)智慧樹知到期末考試答案2024年數(shù)據(jù)結(jié)構(gòu)(全英文)Consider
the
following
definition
in
C
programming
languagestruct
node
{
int
data;
struct
node
*
next;}typedef
struct
node
NODE;NODE
*ptr;Which
of
the
following
c
code
is
used
to
create
new
node?(
)
A:ptr=(NODE*)malloc(sizeof(NODE));B:malloc(sizeof(NODE));C:ptr=(NODD:ptr=(NODE*)malloc(NODE);E:ptr=(NODE*)malloc(sizeof(NODE*));答案:ptr=(NODE*)malloc(sizeof(NODE));26.
Identify
the
recursive
expression
to
obtain
the
nth
Fibonacci
number
using
recursion.
(
)
A:fib(n)=fib(n+1)+fib(n+2)B:fib(n-1)=fib(n)+fib(n+1)C:fib(n+1)=fib(n)+fib(n-1)D:fib(n)=fib(n-1)+fib(n-2)答案:bConsider
the
following
C
code,
where
stack
is
implemented
using
the
array.#define
MAX
10struct
STACK
{
int
arr[MAX]
int
top
=
-1;}In
this
implementation
of
stack,
maximum
value
of
top
which
cannot
cause
overflow
will(
)
A:-1B:9C:1D:10答案:945.
If
there
are
n
non-zero
terms
in
a
polynomial,
the
size
of
the
array
required
would
be________.(
)
A:2n-1B:2n+1C:nD:2n答案:n39.
In
the
polynomial,
A(x)=
x4+10x3+3x2+1,
what
is
(coefficient,
exponent)
pair
of
last
term?
(
)
A:(0,1)B:(1,4)C:(4,1)D:(1,0)答案:(1,0)Deletion
of
an
element
from
the
array
reduces
the
size
of
array
by
(
)
A:oneB:threeC:zeroD:two答案:oneA
normal
queue,
if
implemented
using
an
array
of
size
MAX_SIZE
in
C,
gets
full
when(
)
A:front=rear+1B:rear=MAX_SIZE-1C:rear=frontD:front=(rear+1)mod
MAX_SIZE答案:rear=MAX_SIZE-1Nodes
that
have
degree
zero
are
called
________nodes.(
)
A:childB:non-terminalC:rootD:leaf答案:leafIf
the
elements
“A”,
“B”,
“C”
and
“D”
are
placed
in
a
queue
and
are
deleted
one
at
a
time,
in
what
order
will
they
be
removed(
)
A:ABDCB:DCBAC:DCABD:ABCD答案:ABCDArray
which
is
having
____________
dimensions
is
called
as
2-D
array.(
)
A:4B:3C:1D:2答案:2If
we
have
declared
an
array
as
int
arr[6];
then
which
of
the
following
array
element
is
considered
as
last
array
element
in
C?(
)
A:arr[0]B:arr[5]C:arr[6]D:arr[4]答案:arr[5]If
the
elements
“A”,
“B”,
“C”
and
“D”
are
placed
in
a
stack
and
are
deleted
one
at
a
time,
in
what
order
will
they
be
removed?(
)
A:DCABB:ABCDC:ABDCD:DCBA答案:DCBAWhat
data
structure
would
you
mostly
likely
see
in
implementation
of
a
recursive
algorithm?(
)
A:QueueB:TreeC:ArrayD:Stack答案:StackChildren
of
the
same
parent
said
to
be______nodes.(
)
A:rootB:childC:siblingD:leaf答案:siblingIf
we
store
the
nodes
of
a
binary
tree
in
an
array
with
index
starting
from
zero,
if
the
leftchild
is
at
index
n,
its
right
brother
at(
)
A:2n+2B:(n-1)/2C:2n+1D:n+1
答案:2n+1User
perform
following
operations
on
stack
of
size
five
:
push(1);pop();push(2);push(3);pop();push(4);pop();pop();push(5);
at
the
end
of
last
operation,
total
number
of
elements
present
in
the
stack
are(
)
A:D.1B:A.3C:C.2D:B.4答案:D.1Whatwouldbetheasymptotictimecomplexitytofindanelementinthelinkedlist?
A:NoneB:O(n)C:O(n2)D:O(1)答案:O(n)A
variant
of
linked
list
in
which
last
node
of
the
list
points
to
the
first
node
of
the
list
is?(
)
A:Multiply
linked
listB:Singly
linked
listC:Circular
linked
listD:Doubly
linked
list答案:AI參考:答案:C:Circularlinkedlist\n\n解釋:題目中描述的是一個鏈表結(jié)構(gòu),其中最后一個節(jié)點指向第一個節(jié)點,這種結(jié)構(gòu)被稱為循環(huán)鏈表(Circularlinkedlist)。其他選項中,單鏈表(Singlylinkedlist)的最后一個節(jié)點不指向第一個節(jié)點,雙鏈表(Doublylinkedlist)的最后一個節(jié)點指向下一個節(jié)點而不是指向第一個節(jié)點,而多鏈表(Avariantoflinkedlist)沒有明確描述最后一個節(jié)點指向第一個節(jié)點的結(jié)構(gòu)。因此,正確答案是C。'26.
Identify
the
recursive
expression
to
obtain
the
nth
Fibonacci
number
using
recursion.
(
)
A:fib(n)=fib(n+1)+fib(n+2)B:fib(n-1)=fib(n)+fib(n+1)C:fib(n+1)=fib(n)+fib(n-1)D:fib(n)=fib(n-1)+fib(n-2)答案:AI參考:正確答案是D:fib(n)=fib(n-1)+fib(n-2)。\n根據(jù)斐波那契數(shù)列的定義,每個數(shù)字是前兩個數(shù)字的和,因此可以使用遞歸表達(dá)式fib(n)=fib(n-1)+fib(n-2)來計算第n個斐波那契數(shù)。選項D是正確的遞歸表達(dá)式。'In
algorithm
which
converts
infix
expression
to
postfix
expression.
the
ICP
stands
for(
)
A:In-Coming
PriorityB:Inside-Count
PriorityC:In-Count
Primary
D:None
of
the
above答案:AI參考:題目中的空格部分應(yīng)填入一個關(guān)于某種算法或程序部分的名稱,這個算法或程序負(fù)責(zé)將infix表達(dá)式轉(zhuǎn)換為postfix表達(dá)式。而選項A的“In-ComingPriority”與題目描述不符,選項B的“Inside-CountPriority”和選項C的“In-CountPrimary”雖然可能與某種特定的算法或程序有關(guān),但并不能從題目描述中直接得出。因此,選項D“Noneoftheabove”是正確的答案。\n\n所以,正確選項是【D:Noneoftheabove】。'45.
If
there
are
n
non-zero
terms
in
a
polynomial,
the
size
of
the
array
required
would
be________.(
)
A:2n-1B:2n+1C:nD:2n答案:AI參考:正確答案是D:2n。\n多項式中如果有n個非零項,那么需要的數(shù)組大小為(n+1)×(n-1)/2,即2n。因此選項D為正確答案。'24.
A
function
which
calls
itself
is
called
as
______function.(
)
A:recursiveB:iterativeC:staticD:dynamic答案:AI參考:正確答案是A:recursive(遞歸的)。\n遞歸函數(shù)是指一個函數(shù)直接或間接調(diào)用自身,所以選項A“recursive”是正確答案。選項B“iterative”(迭代的)描述的是重復(fù)的過程,與遞歸不符;選項C“static”(靜態(tài)的)和選項D“dynamic”(動態(tài)的)描述的是其他性質(zhì),與本題無關(guān)。'In
the
stack,
if
user
try
to
remove
element
from
the
empty
stack
then
it
called
as
(
)
A:garbageB:underflowC:emptyD:overflow答案:AI參考:在堆棧中,如果用戶嘗試從空堆棧中刪除元素,那么這被稱為“下溢”。因此,正確答案是B:underflow。'66.
If
an
algorithm
include
two
for
(or
while)
loops,
the
time
complexity
of
algorithm
may
become________.(
)
A:constantB:linear.C:logarithmic.D:quadratic答案:AI參考:答案:D\n推理過程:算法包含兩個for(或while)循環(huán),其時間復(fù)雜度可能會變?yōu)槎蔚?。因此,選項D為正確答案。\n\n解釋:時間復(fù)雜度是用來衡量算法執(zhí)行時間的一個指標(biāo),它通常用算法執(zhí)行次數(shù)與輸入規(guī)模之間的關(guān)系來描述。如果一個算法包含兩個嵌套循環(huán),那么其執(zhí)行次數(shù)可能會增加,從而導(dǎo)致時間復(fù)雜度增加。具體來說,如果嵌套循環(huán)的次數(shù)與輸入規(guī)模呈線性關(guān)系,那么時間復(fù)雜度就是線性的;如果呈對數(shù)關(guān)系,那么時間復(fù)雜度就是對數(shù)的;如果呈平方關(guān)系,那么時間復(fù)雜度就是二次的。在本題中,由于沒有給出具體的算法和輸入規(guī)模,我們無法確定時間復(fù)雜度具體是多少,但可以確定的是它不會是常數(shù)和logarithmic。因此,選項D是正確答案。'The
preorder
traversal
sequence
of
a
binary
search
tree
is
30,
20,
10,
15,
25,
23,
39,
35,
42.
Which
one
of
the
following
is
the
postorder
traversal
sequence
of
the
same
tree?(
)
A:15,
10,
25,
23,
20,
42,
35,
39,
30B:15,
20,
10,
23,
25,
42,
35,
39,
30C:15,
10,
23,
25,
20,
35,
42,
39,
30D:10,
20,
15,
23,
25,
35,
42,
39,
30答案:AI參考:答案為D:10,
20,
15,
23,
25,
35,
42,
39,
30\n\n原始二叉搜索樹的前序遍歷序列為30,20,10,15,25,23,39,35,42,因此可以推斷出它是一個二叉搜索樹。對于一個二叉搜索樹,前序遍歷的逆序后序遍歷也是一棵二叉搜索樹。所以選項D是正確的后序遍歷序列。因此,答案為D。'The
______implementation
uses
arrays
to
create
stack.(
)
A:linkedB:static
C:dynamicD:linear答案:AI參考:正確答案是C:dynamic。\n根據(jù)題意,這個動態(tài)的實現(xiàn)使用數(shù)組來創(chuàng)建堆棧。因此,選項C“dynamic”是正確答案。選項A“l(fā)inked”表示鏈接的,選項B“static”表示靜態(tài)的,選項D“l(fā)inear”表示線性的,都與題目中的描述不符。'68.
What
is
the
not
the
property
of
linked
list?
(
)
A:The
space
required
is
proportional
to
its
lengthB:Random
access
of
any
node
is
easyC:There
is
no
need
to
estimate
the
storage
space
D:Insertion
and
deletion
do
not
require
the
element
to
be
moved答案:AI參考:正確答案是:D:Insertion
and
deletion
do
not
require
the
element
to
be
moved。\n鏈表是一種非連續(xù)存儲結(jié)構(gòu),因此插入和刪除不需要移動元素,所以D選項正確??臻g需求與長度成比例,這是數(shù)組的特點;鏈表節(jié)點隨機訪問困難;插入和刪除需要估計存儲空間。因此,選項A、B、C都不正確。'48.
What
is
the
maximum
number
of
nodes
with
degree
zero
in
a
binary
tree
at
level
3?
(
)
A:3B:5C:9D:4答案:AI參考:正確答案是B,5。在一個二叉樹中,如果一個節(jié)點的高度為n,那么它左右子樹的高度之和最多為n-1。因此,一個節(jié)點的高度為3時,其左右子樹最多可以有兩個。另外,高度為3的節(jié)點可能是根節(jié)點或者是第二個級別下得第二個節(jié)點的右子節(jié)點或第三個級別的根節(jié)點,這樣使得所有可能的度為0的節(jié)點總數(shù)不超過5個。因此,答案為B。'Identify
the
infix
expression.(
)
A:None
of
the
aboveB:+A
BC:AB+
D:A+B答案:AI參考:正確答案是D:A+B。\n根據(jù)題目中的描述,需要識別一個中綴表達(dá)式。選項A表示“以上都不是”,不符合中綴表達(dá)式的定義;選項B和C中的符號不符合中綴表達(dá)式的規(guī)則;只有選項D中的A+B符合中綴表達(dá)式的定義,即運算符位于兩個操作數(shù)之間。因此,正確答案是D。'In
order
to
keep
track
of
current
topmost
element
of
the
stack
we
need
to
maintain
one
variable
called(
)
A:falseB:bottomC:topD:true答案:AI參考:正確選項是B:bottom。\n\n在題目中提到需要維護(hù)一個變量來追蹤棧中當(dāng)前最頂部的元素,而選項B“bottom”正是這樣一個變量名稱,它通常用于表示棧的最底部元素。其他選項A、C、D都不符合題意。因此,答案為B。'When
user
switch
from
one
function
to
other
then
the
details
of
previous
function
are
stored
into
the
stack.(
)
A:TrueB:False答案:AI參考:答案:A:True\n根據(jù)題目描述,當(dāng)用戶從一個功能切換到另一個功能時,前一個功能的詳細(xì)信息會被存儲到堆棧中。所以這個說法是正確的,即選項A為正確答案。'Array
which
is
having
____________
dimensions
is
called
as
2-D
array.(
)
A:4B:3C:1D:2答案:AI參考:正確答案是:D:2。\n本題考察數(shù)組維度知識。題目中描述“一個具有**2**維度的數(shù)組”也就是一個二維數(shù)組。所以答案是D選項。'The
________notation
is
used
in
Computer
Science
to
describe
the
performance
or
complexity
of
an
algorithm.(
)
A:Big
PB:Small
OhC:BigD:Big
Oh答案:AI參考:正確答案是D:Big
Oh。\n表示法"表示法",因此要選擇與"表示法"相符的詞。在選項中只有D是表示"大"的意思,故答案為D。因此,正確答案是D,表示法的標(biāo)志。BigOh(大O符號)是一種表示算法復(fù)雜性的方法,主要用于衡量算法執(zhí)行時間對輸入大小的敏感度。故答案為D。'4.
Within
a
computer,
all
information
is
accessed,
processed
and
transmitted
in
the
form
of:(
)
A:HexadecimalB:BCD
C:ACSIID:Binary
答案:AI參考:正確答案是D:二進(jìn)制。\n計算機內(nèi)部所有信息都是以二進(jìn)制的形式進(jìn)行訪問、處理和傳輸?shù)?。因此,正確答案是D。二進(jìn)制是一種只有0和1兩種狀態(tài)的比特序列,是計算機中常用的數(shù)據(jù)表示和傳輸方式。其他選項中,十六進(jìn)制、BCD和ACSII都不是計算機內(nèi)部信息表示和傳輸?shù)臉?biāo)準(zhǔn)方式。'Which
of
the
following
data
structures
is
a
nonlinear
structure?
(
)
A:Binary
treeB:Stack
C:Queue
D:Linked
list
答案:AI參考:正確答案是D:Linkedlist。\n鏈表是一種非線性的數(shù)據(jù)結(jié)構(gòu),它是由一系列節(jié)點組成的,每個節(jié)點包含數(shù)據(jù)和指向下一個節(jié)點的指針。而二叉樹、棧和隊列都是線性結(jié)構(gòu),其中二叉樹是樹形結(jié)構(gòu),棧是后進(jìn)先出(LIFO)的數(shù)據(jù)結(jié)構(gòu),隊列是先進(jìn)先出(FIFO)的數(shù)據(jù)結(jié)構(gòu)。因此,答案為D。'64.
What
of
the
following
statements
is
incorrect
regarding
linked
lists?
(
)
A:Linked
lists
are
example
for
dynamic
data
structureB:Linked
lists
example
for
linear
data
structureC:Linked
lists
can
be
circularD:Linked
lists
is
an
example
of
nonlinear
data
structure答案:AI參考:題目描述:以下關(guān)于鏈表的陳述哪個不正確?\n\n根據(jù)題目要求,我們需要找出關(guān)于鏈表表述不正確的選項。\n\n選項分析:\n\nA.Linkedlistsareexamplefordynamicdatastructure(鏈表是動態(tài)數(shù)據(jù)結(jié)構(gòu)的示例)-正確。鏈表是一種動態(tài)數(shù)據(jù)結(jié)構(gòu),可以根據(jù)需要動態(tài)地添加或刪除元素。\n\nB.Linkedlistsareexampleforlineardatastructure(鏈表是線性數(shù)據(jù)結(jié)構(gòu)的示例)-錯誤。鏈表是一種鏈?zhǔn)浇Y(jié)構(gòu),每個元素都鏈接到下一個元素,因此是線性的。\n\nC.Linkedlistscanbecircular(鏈表可以是循環(huán)的)-正確。鏈表可以通過在最后一個元素后鏈接一個新的元素形成一個循環(huán)。\n\nD.Linkedlistsisanexampleofnonlineardatastructure(鏈表是非線性數(shù)據(jù)
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 團知識競賽活動方案8篇
- 2025年醫(yī)療委托服務(wù)協(xié)議樣本
- 上海市松江區(qū)汽車租賃服務(wù)合同模板
- 2025年冬季供暖系統(tǒng)承包協(xié)議
- 2025年經(jīng)營權(quán)讓渡協(xié)議第十七案
- 2025年寫字樓租賃合同續(xù)租協(xié)議書
- 2025年砂洗機項目申請報告模稿
- 2025年醫(yī)師專業(yè)技能提升合作協(xié)議書范本
- 2025年藥效學(xué)研究服務(wù)項目申請報告
- 2025年鄉(xiāng)村住宅修建工程協(xié)議
- 全套教學(xué)課件《工程倫理學(xué)》
- JJG 976-2024透射式煙度計
- 清華大學(xué)考生自述
- 小學(xué)生讀書卡模板
- 8.3 摩擦力 同步練習(xí)-2021-2022學(xué)年人教版物理八年級下冊(Word版含答案)
- 初中足球選拔測試標(biāo)準(zhǔn)
- 《現(xiàn)代漢語詞匯》PPT課件(完整版)
- 生理學(xué)教學(xué)大綱
- 環(huán)保鐵1215物質(zhì)安全資料表MSDS
- “君子教育”特色課程的探索
- AS9100D人力資源管理程序(范本)
評論
0/150
提交評論