


付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
数据结构(全英文)智慧树知到期末考试答案+章节答案2024年山东科技大学The
________notation
is
used
in
Computer
Science
to
describe
the
performance
or
complexity
of
an
algorithm.(
)
答案:Big
Oh26.
Identify
the
recursive
expression
to
obtain
the
nth
Fibonacci
number
using
recursion.
(
)
答案:fib(n)=fib(n-1)+fib(n-2)7.
The
data
structure
which
is
designed
to
determine
whether
the
left
and
right
brackets
are
paired
in
the
expression
is:
(
)
答案:StackThetimecomplexityofBinarysearchalgorithmwithnelementsis________.
答案:26.
Binary
search
works
on
________arrays.(
)
答案:sortedConsider
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?(
)
答案:ptr=(NODE*)malloc(sizeof(NODE));If
we
store
the
nodes
of
a
binary
tree
in
an
array
with
index
starting
from
zero,
the
left
child
of
a
node
having
index
n
can
be
obtained
by(
)
答案:2n+1The
common
feature
of
stacks
and
queues
is
(
).
答案:Only
elements
are
allowed
to
be
inserted
and
deleted
at
the
end
pointsIn
a
stack,
the
process
of
removing
an
element
is
called
as
(
)
答案:POPEach
node
in
a
linked
list
contain
minimum
two
fields
one
field
called
data
field
to
store
data.
Another
field
is
of
type
(
)
答案:Pointer
to
node40.
In
the
polynomial,
A(x)=
x4+10x3+3x2+1,
what
is
(exponent,
coefficient)
pair
of
first
term?
(
)
答案:(4,1)Consider
the
following
C
code,
where
stack
is
implemented
using
the
array.#define
MAX
10struct
STACK
{
int
arr[MAX]
int
top
=
__________;}What
will
be
the
initial
value
with
which
top
is
initialized?(
)
答案:-1Array
is
an
example
of
_______
type
memory
allocation.(
)
答案:compile
time59.
Consider
an
integer
array
which
stores
the
values
of
binary
tree
as
(91,6,82,18,4,2,100).
What
is
the
value
of
father
node
of
node
with
value
2?
(
)
答案:82Pushing
element
to
stack
means(
).
答案:Placing
element
at
the
topThe
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?(
)
答案:15,
10,
23,
25,
20,
35,
42,
39,
30The
elements
are
removed
form
stack
in
__________order(
)
答案:ReverseIf
we
store
the
nodes
of
a
binary
tree
in
an
array
with
index
starting
from
zero,
the
father
of
a
node
having
index
n
can
be
obtained
by(
)
答案:(n-1)/2User
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(
)
答案:D.1Which
of
the
following
tree
traversal
visits
the
root
first?(
)
答案:PreorderA
linear
list
of
elements
in
which
deletion
can
be
done
from
one
end
(front)
and
insertion
can
take
place
only
at
the
other
end
(rear)
is
known
as
a(
)
答案:QueueWhich
of
the
following
term
is
not
used
with
stacks
in
general?
(
)
答案:Front64.
What
of
the
following
statements
is
incorrect
regarding
linked
lists?
(
)
答案:Linked
lists
is
an
example
of
nonlinear
data
structure17.
Logically,
data
structures
can
be
divided
into
two
categories:
(
)
答案:Linear
and
nonlinear18.
Which
of
the
following
data
structures
is
a
linear
structure?
(
)
答案:String25.
Identify
the
recursive
expression
to
find
the
factorial
of
a
number
using
recursion.
(
)
答案:fact(n)=n*fact(n-1)In
algorithm
which
converts
infix
expression
to
postfix
expression.
the
ICP
stands
for(
)
答案:In-Coming
PriorityWhich
of
the
following
data
structures
is
a
nonlinear
structure?
(
)
答案:Binary
tree37.
In
the
polynomial,
A(x)=
x4+10x3+3x2+1,
what
is
the
correct
list
of
exponents
only?
(
)
答案:(4,3,2,0)What
is
the
maximum
number
of
nodes
in
a
binary
tree
with
depth
of
4?
(
)
答案:15If
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(
)
答案:ABCDIf
two
numbers
in
sequence
in
the
Fibonacci
series
are
13,
21,
what
is
the
next
number?
(
)
答案:3462.
Which
of
the
following
statement
about
the
algorithm
is
wrong:
(
)
答案:All
the
above
statements
are
incorrectA
linear
collection
of
data
element
given
by
means
of
pointer
is
called
(
)
答案:Linked
list23.
Arrows
in
the
flowchart
is
used
for
the
purpose
of
______.(
)
答案:to
decide
the
order
of
steps19.
In
the
following
data,__________is
a
nonlinear
data
structure.
(
)
答案:binary
treeArray
which
is
having
____________
dimensions
is
called
as
2-D
array.(
)
答案:2While
evaluating
expressions
using
computers,
computer
prefer
___________expression.(
)
答案:postfix20.
The
word
algorithm
is
derived
from
the
name
of
__________________.
(
)
答案:Ibn
Musa
Al-KhwarizmiThemaximumnumberofnodesofleveliofabinarytreeis___,fori≥1.
答案:Queues
serve
major
role
in(
)
答案:Simulation
of
limited
resource
allocationConsider
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(
)
答案:9The
following
numbers
are
inserted
into
an
empty
binary
search
tree
in
the
given
order:
10,1,
3,
5,
15,
12,
16.
What
is
the
height
of
the
binary
search
tree?(
)
答案:4Find
the
correct
statement
(
)
答案:Generating
Fibonacci
series,
and
finding
a
factorial
of
number
programs
can
be
implemented
using
both
iteration
and
recursion.55.
Consider
an
integer
array
which
stores
the
values
of
binary
tree
as
(91,6,82,18,4,2,100).
What
is
the
depth
of
this
binary
tree?
(
)
答案:3Which
of
the
following
case
does
not
exist
in
complexity
theory
(
)
答案:Null
case45.
If
there
are
n
non-zero
terms
in
a
polynomial,
the
size
of
the
array
required
would
be________.(
)
答案:2n+116.
In
a
Binary
Search
Tree,
for
any
root
of
subtree,
the
keys
of
all
nodes
in
its
left
subtree
is
____________to
the
keys
of
all
nodes
in
its
right
subtree.
(
)
答案:less
than
or
equal
to13.
Which
of
the
following
term
is
used
with
queues
in
general?
(
)
答案:rearIn
the
polynomial,
A(x)=
x4+10x3+3x2+1,
if
we
start
representing
using
array,
what
is
the
maximum
size
of
array?
(
)
答案:9Ifwestorethenodesofabinarytreeinanarraywithindexstartingfromzero,therightchildofanodehavingindexncanbeobtainedat:
答案:2n+2Themaximumnumberofnodesinatreeforwhichpostorderandpreordertraversalsmaybeequaltois_______.
答案:1WhichofthefollowingtraversaloutputsthedatainsortedorderinaBST?
答案:InorderWhatisthemaximumnumberchildrenthatabinarytreenodecanhave?
答案:2Supposethenumbers7,5,1,8,3,6,0,9,4,2areinsertedinthatorderintoaninitiallyemptyBinarySearchTree.TheBinarySearchTreeusestheusualorderingonnaturalnumbers.Whatistheinordertraversalsequenceoftheresultanttree?
答案:0123456789Theinordertraversaloftreewillyieldasortedlistingofelementsoftreein
答案:BinarysearchtreesAcompletebinarytreeisatreewhere________________.
答案:everylevelofthetreeiscompletelyfilledexceptthelastlevelAfullbinarytreeisatreewhere________________.
答案:eachnodehasexactlyzeroortwochildren.Toobtainaprefixexpression,whichofthefollowingtraversalsisused?
答案:PreorderTorepresenthierarchicalrelationshipbetweenelements,whichdatastructureissuitable?
答案:treeA
linearlistofdataelementswhereeachelementcallednodeisgivenbymeansofpointeriscalled
答案:linkedlistIndoublylinkedlists,traversalcanbeperformed?
答案:InbothdirectionsWhatisthetimecomplexitytocountthenumberofelementsinthelinkedlist?
答案:O(n)Whatkindoflistisbesttoanswerquestionssuchas:“Whatistheitematpositionn?”
答案:ListimplementedwithanarrayConsideranimplementationofunsortedsinglylinkedlist.Supposeithasrepresentationwhichaheadpointeronly.Giventherepresentation,whichofthefollowingoperationcanbeimplementedinO(1)time?(I).Insertionatthefrontofthelinkedlist.(II).Insertionattheendofthelinkedlist.(III).Deletionofthefrontnodeofthelinkedlist.(IV).Deletionofthelastnodeofthelinkedlist.
答案:IandIIIInwhichofthefollowinglinkedliststherearenoNULLlinks?
答案:CircularlinkedlistThelinkfieldinanodecontains:
答案:addressofthenextnodeInasinglylinkedlistwhichoperationdependsonthelengthofthelist.
答案:DeletethelastelementofthelistLinkedlistdatastructureoffersconsiderablesavingin:
答案:SpaceutilizationandcomputationaltimeAlinearlistinwhicheachnodehaspointerstopointtothepredecessorandsuccessorsnodesiscalledas:
答案:Doubly-linkedlistsOnedifferencebetweenaqueueandastackis:
答案:Queuesusetwoendsforaddinganddeleting,butstacksuseone.Whatisthetimecomplexityofalinearqueuehavingnelements?
答案:O(n)Inaqueuethedeletionsaretakeplaceat_________.
答案:frontOneoftheadvantageofcircularqueueis_____________.
答案:effectiveuseofmemoryInaqueuetheinsertionsaretakeplaceat_________.
答案:rearAqueueisadatastructureinwhichallinsertionsanddeletionsaremaderespectivelyat:
答案:rearandfrontWhatisadequeue?
答案:Aqueuewithinsert/deletedefinedforbothfrontandrearendsofthequeueWhichofthefollowingisnotthetypeofqueue.
答案:singleendedqueueIncircularqueue,thefrontwillalwayspointtooneposition__________fromthefirstelementinthequeue.
答案:counterclockwiseThefollowingdatastructureisusedforschedulingofjobsduringbatchprocessingincomputers.
答案:queueTheelementisinsertedfirstandwillberemovedlastin
_____________.
答案:stackThepostfixformofA*B+C/Dis?
答案:AB*CD/+Thedatastructurerequiredtocheckwhetheranexpressioncontainsbalancedparenthesisis?
答案:StackWhichofthefollowingstatementiscorrect.
答案:ApostfixexpressionisnotthereverseoftheprefixexpressionWhichofthefollowingapplicationsmayuseastack?:
答案:AlloftheaboveAstackisadatastructureinwhichallinsertionsanddeletionsaremaderespectivelyat:
答案:oneendWhichdatastructureisneededtoconvertinfixnotationtopostfixnotation?
答案:StackTransformthefollowinginfixexpressiontopostfixform.
(A+B)*(C-D)/E
答案:AB+CD-*E/Transformthefollowinginfixexpressiontoprefixform.
((C*2)+1)/(A+B)
答案:/+*C21+ABTheexpression1*2^3*4^5*6isevaluatedas(^isforpower,asina^b=ab):
答案:49152WhilerepresentingthesparsematrixA(m×n)withtnon-zerotermsin3-tuplesform,thesizeofthematrixbecomes
答案:(t+1)×3Amatrixhavingalargernumberofelementswithzerovaluesthanthenumberofnon-zeroelementsissaidtobea_____________.
答案:sparsematrixDeletionofanelementfromthearrayreducesthesizeofarrayby___________.
答案:oneWhichofthefollowingstatementistrueregardingTRANSPOSEandFAST_TRANSPOSEalgorithms.
答案:TheTRANSPOSEalgorithmisslowerthanFAST_TRANSPOSEConsideringasparseofm×nmatrixwithtnon-zeroterms,inFAST_TRANSPOSEalgorithm,thesizeofone-dimensionalarray(SorT)isequalto:
答案:nTwodimensionalarraysareusefulwhentheelementsbeingprocessed
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 责令改正法律适用研究
- SLM成形HfO2@TiCp-GH3536复合材料组织性能研究
- 基于VR-AR的编程课程教学设计与应用研究-以中职C语言为例
- 糖尿病酮症病人的个案护理
- 妇女两癌健康知识
- 幼儿健康蔬菜知识启蒙
- 颌面部骨折护理课件
- 某企业客户关系管理分析
- 2025护理质量控制计划
- 傅玄教育思想体系解析
- 幼儿教育毕业论文8000字
- 土木工程结构力学课件
- 学校国际学生管理制度
- 旧钢板桩买卖合同范本
- 第1章 人工智能概述幻灯片
- 工程尾款减免协议书
- 基因组变异数据库构建-洞察阐释
- 地铁安检考试试题及答案
- 人生规划家族会议课件
- DB36T 2033.2-2024国土空间总体规划数据库规范+第2部分:县级
- TCCEAS001-2022建设项目工程总承包计价规范
评论
0/150
提交评论