


下載本文檔
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
數(shù)據(jù)結(jié)構(gòu)(全英文)智慧樹(shù)知到期末考試答案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解釋?zhuān)侯}目中描述的是一個(gè)鏈表結(jié)構(gòu),其中最后一個(gè)節(jié)點(diǎn)指向第一個(gè)節(jié)點(diǎn),這種結(jié)構(gòu)被稱(chēng)為循環(huán)鏈表(Circularlinkedlist)。其他選項(xiàng)中,單鏈表(Singlylinkedlist)的最后一個(gè)節(jié)點(diǎn)不指向第一個(gè)節(jié)點(diǎn),雙鏈表(Doublylinkedlist)的最后一個(gè)節(jié)點(diǎn)指向下一個(gè)節(jié)點(diǎn)而不是指向第一個(gè)節(jié)點(diǎn),而多鏈表(Avariantoflinkedlist)沒(méi)有明確描述最后一個(gè)節(jié)點(diǎn)指向第一個(gè)節(jié)點(diǎn)的結(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ù)列的定義,每個(gè)數(shù)字是前兩個(gè)數(shù)字的和,因此可以使用遞歸表達(dá)式fib(n)=fib(n-1)+fib(n-2)來(lái)計(jì)算第n個(gè)斐波那契數(shù)。選項(xiàng)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)填入一個(gè)關(guān)于某種算法或程序部分的名稱(chēng),這個(gè)算法或程序負(fù)責(zé)將infix表達(dá)式轉(zhuǎn)換為postfix表達(dá)式。而選項(xiàng)A的“In-ComingPriority”與題目描述不符,選項(xiàng)B的“Inside-CountPriority”和選項(xiàng)C的“In-CountPrimary”雖然可能與某種特定的算法或程序有關(guān),但并不能從題目描述中直接得出。因此,選項(xiàng)D“Noneoftheabove”是正確的答案。\n\n所以,正確選項(xiàng)是【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多項(xiàng)式中如果有n個(gè)非零項(xiàng),那么需要的數(shù)組大小為(n+1)×(n-1)/2,即2n。因此選項(xiàng)D為正確答案。'24.
A
function
which
calls
itself
is
called
as
______function.(
)
A:recursiveB:iterativeC:staticD:dynamic答案:AI參考:正確答案是A:recursive(遞歸的)。\n遞歸函數(shù)是指一個(gè)函數(shù)直接或間接調(diào)用自身,所以選項(xiàng)A“recursive”是正確答案。選項(xiàng)B“iterative”(迭代的)描述的是重復(fù)的過(guò)程,與遞歸不符;選項(xiàng)C“static”(靜態(tài)的)和選項(xiàng)D“dynamic”(動(dòng)態(tài)的)描述的是其他性質(zhì),與本題無(wú)關(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參考:在堆棧中,如果用戶嘗試從空堆棧中刪除元素,那么這被稱(chēng)為“下溢”。因此,正確答案是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推理過(guò)程:算法包含兩個(gè)for(或while)循環(huán),其時(shí)間復(fù)雜度可能會(huì)變?yōu)槎蔚?。因此,選項(xiàng)D為正確答案。\n\n解釋?zhuān)簳r(shí)間復(fù)雜度是用來(lái)衡量算法執(zhí)行時(shí)間的一個(gè)指標(biāo),它通常用算法執(zhí)行次數(shù)與輸入規(guī)模之間的關(guān)系來(lái)描述。如果一個(gè)算法包含兩個(gè)嵌套循環(huán),那么其執(zhí)行次數(shù)可能會(huì)增加,從而導(dǎo)致時(shí)間復(fù)雜度增加。具體來(lái)說(shuō),如果嵌套循環(huán)的次數(shù)與輸入規(guī)模呈線性關(guān)系,那么時(shí)間復(fù)雜度就是線性的;如果呈對(duì)數(shù)關(guān)系,那么時(shí)間復(fù)雜度就是對(duì)數(shù)的;如果呈平方關(guān)系,那么時(shí)間復(fù)雜度就是二次的。在本題中,由于沒(méi)有給出具體的算法和輸入規(guī)模,我們無(wú)法確定時(shí)間復(fù)雜度具體是多少,但可以確定的是它不會(huì)是常數(shù)和logarithmic。因此,選項(xiàng)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原始二叉搜索樹(shù)的前序遍歷序列為30,20,10,15,25,23,39,35,42,因此可以推斷出它是一個(gè)二叉搜索樹(shù)。對(duì)于一個(gè)二叉搜索樹(shù),前序遍歷的逆序后序遍歷也是一棵二叉搜索樹(shù)。所以選項(xiàng)D是正確的后序遍歷序列。因此,答案為D。'The
______implementation
uses
arrays
to
create
stack.(
)
A:linkedB:static
C:dynamicD:linear答案:AI參考:正確答案是C:dynamic。\n根據(jù)題意,這個(gè)動(dòng)態(tài)的實(shí)現(xiàn)使用數(shù)組來(lái)創(chuàng)建堆棧。因此,選項(xiàng)C“dynamic”是正確答案。選項(xiàng)A“l(fā)inked”表示鏈接的,選項(xiàng)B“static”表示靜態(tài)的,選項(xiàng)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ù)存儲(chǔ)結(jié)構(gòu),因此插入和刪除不需要移動(dòng)元素,所以D選項(xiàng)正確。空間需求與長(zhǎng)度成比例,這是數(shù)組的特點(diǎn);鏈表節(jié)點(diǎn)隨機(jī)訪問(wèn)困難;插入和刪除需要估計(jì)存儲(chǔ)空間。因此,選項(xiàng)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。在一個(gè)二叉樹(shù)中,如果一個(gè)節(jié)點(diǎn)的高度為n,那么它左右子樹(shù)的高度之和最多為n-1。因此,一個(gè)節(jié)點(diǎn)的高度為3時(shí),其左右子樹(shù)最多可以有兩個(gè)。另外,高度為3的節(jié)點(diǎn)可能是根節(jié)點(diǎn)或者是第二個(gè)級(jí)別下得第二個(gè)節(jié)點(diǎn)的右子節(jié)點(diǎn)或第三個(gè)級(jí)別的根節(jié)點(diǎn),這樣使得所有可能的度為0的節(jié)點(diǎn)總數(shù)不超過(guò)5個(gè)。因此,答案為B。'Identify
the
infix
expression.(
)
A:None
of
the
aboveB:+A
BC:AB+
D:A+B答案:AI參考:正確答案是D:A+B。\n根據(jù)題目中的描述,需要識(shí)別一個(gè)中綴表達(dá)式。選項(xiàng)A表示“以上都不是”,不符合中綴表達(dá)式的定義;選項(xiàng)B和C中的符號(hào)不符合中綴表達(dá)式的規(guī)則;只有選項(xiàng)D中的A+B符合中綴表達(dá)式的定義,即運(yùn)算符位于兩個(gè)操作數(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參考:正確選項(xiàng)是B:bottom。\n\n在題目中提到需要維護(hù)一個(gè)變量來(lái)追蹤棧中當(dāng)前最頂部的元素,而選項(xiàng)B“bottom”正是這樣一個(gè)變量名稱(chēng),它通常用于表示棧的最底部元素。其他選項(xiàng)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)用戶從一個(gè)功能切換到另一個(gè)功能時(shí),前一個(gè)功能的詳細(xì)信息會(huì)被存儲(chǔ)到堆棧中。所以這個(gè)說(shuō)法是正確的,即選項(xiàng)A為正確答案。'Array
which
is
having
____________
dimensions
is
called
as
2-D
array.(
)
A:4B:3C:1D:2答案:AI參考:正確答案是:D:2。\n本題考察數(shù)組維度知識(shí)。題目中描述“一個(gè)具有**2**維度的數(shù)組”也就是一個(gè)二維數(shù)組。所以答案是D選項(xiàng)。'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表示法"表示法",因此要選擇與"表示法"相符的詞。在選項(xiàng)中只有D是表示"大"的意思,故答案為D。因此,正確答案是D,表示法的標(biāo)志。BigOh(大O符號(hào))是一種表示算法復(fù)雜性的方法,主要用于衡量算法執(zhí)行時(shí)間對(duì)輸入大小的敏感度。故答案為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計(jì)算機(jī)內(nèi)部所有信息都是以二進(jìn)制的形式進(jìn)行訪問(wèn)、處理和傳輸?shù)?。因此,正確答案是D。二進(jìn)制是一種只有0和1兩種狀態(tài)的比特序列,是計(jì)算機(jī)中常用的數(shù)據(jù)表示和傳輸方式。其他選項(xiàng)中,十六進(jìn)制、BCD和ACSII都不是計(jì)算機(jī)內(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é)點(diǎn)組成的,每個(gè)節(jié)點(diǎn)包含數(shù)據(jù)和指向下一個(gè)節(jié)點(diǎn)的指針。而二叉樹(shù)、棧和隊(duì)列都是線性結(jié)構(gòu),其中二叉樹(shù)是樹(shù)形結(jié)構(gòu),棧是后進(jìn)先出(LIFO)的數(shù)據(jù)結(jié)構(gòu),隊(duì)列是先進(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)于鏈表的陳述哪個(gè)不正確?\n\n根據(jù)題目要求,我們需要找出關(guān)于鏈表表述不正確的選項(xiàng)。\n\n選項(xiàng)分析:\n\nA.Linkedlistsareexamplefordynamicdatastructure(鏈表是動(dòng)態(tài)數(shù)據(jù)結(jié)構(gòu)的示例)-正確。鏈表是一種動(dòng)態(tài)數(shù)據(jù)結(jié)構(gòu),可以根據(jù)需要?jiǎng)討B(tài)地添加或刪除元素。\n\nB.Linkedlistsareexampleforlineardatastructure(鏈表是線性數(shù)據(jù)結(jié)構(gòu)的示例)-錯(cuò)誤。鏈表是一種鏈?zhǔn)浇Y(jié)構(gòu),每個(gè)元素都鏈接到下一個(gè)元素,因此是線性的。\n\nC.Linkedlistscanbecircular(鏈表可以是循環(huán)的)-正確。鏈表可以通過(guò)在最后一個(gè)元素后鏈接一個(gè)新的元素形成一個(gè)循環(huán)。\n\nD.Linkedlistsisanexampleofnonlineardatastructure(鏈表是非線性數(shù)據(jù)
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年中國(guó)金紅珠葡萄酒市場(chǎng)調(diào)查研究報(bào)告
- 2025年中國(guó)硅酸鋁土市場(chǎng)調(diào)查研究報(bào)告
- 公路冷鏈貨物運(yùn)輸合同范本
- 專(zhuān)職網(wǎng)格員聘用合同范本
- 辦公室裝修工程標(biāo)準(zhǔn)合同
- 分銷(xiāo)合作協(xié)議合同書(shū)
- 定制婚紗設(shè)計(jì)合同協(xié)議書(shū)范本
- 學(xué)校操場(chǎng)改造工程建設(shè)項(xiàng)目合同
- 2024年物流專(zhuān)業(yè)大學(xué)生實(shí)習(xí)報(bào)告范文(3篇)
- 2024年村主任年終個(gè)人述職報(bào)告(32篇)
- 高三一?!吧媾c強(qiáng)弱關(guān)系思辨”審題立意及范文
- 2025年茂名市高三年級(jí)第一次綜合測(cè)試(一模)物理試卷(含答案)
- 2025年重癥醫(yī)學(xué)科(ICU)護(hù)理工作計(jì)劃
- 《電子商務(wù)法律法規(guī)》電子商務(wù)專(zhuān)業(yè)全套教學(xué)課件
- 《產(chǎn)后出血預(yù)防與處理指南(2023)》解讀課件
- 全套教學(xué)課件《工程倫理學(xué)》
- 江蘇省建筑與裝飾工程計(jì)價(jià)定額(2014)電子表格版
- 清華大學(xué)考生自述
- 幼兒園中班繪本:《我喜歡我的小毯子》
- 沉積學(xué)與古地理
- 化工原理課程設(shè)計(jì)(換熱器)
評(píng)論
0/150
提交評(píng)論