Algorithms (Questions And Answers)
Algorithm b- bcorrect banswers✔✔a bstep-by-step bprocedure bfor bsolving ba bproblem
Abstraction b- bcorrect banswers✔✔Removing bunnecessary bdetails bfrom ba bproblem.
Decomposition b- bcorrect banswers✔✔Breaking bdown ba bproblem binto bsmaller bpieces
Pseudocode b- bcorrect banswers✔✔code bwritten bin bplain bEnglish bwithout bworrying
babout bsyntax
Variable b- bcorrect banswers✔✔container bthat bcan bstore bdata band bcan bbe bchanged
Constant b- bcorrect banswers✔✔a bvariable bthat bcan bnot bbe bchanged bwhen bthe
bprogram bis bexecuted.
Trace bTables b- bcorrect banswers✔✔A bmanual bway bof btracking bprogress bthrough ban
balgorithm bbefore bit bis bcoded. bIt btracks bthe bchanging bvalues bof bvariables bthrough
bthe bcode.
Efficiency b- bcorrect banswers✔✔looks bat bhow bmuch btime bit btakes bto brun ba
bparticular balgorithm band bhow bmuch bspace bis bneeded.
Linear bSearch b- bcorrect banswers✔✔This bsearch bmethod bstarts bat bthe bbeginning bof
bthe blist band bcompares beach belement bin bturn bwith bthe brequired bvalue buntil ba
bmatch bis bfound bor bthe bend bof bthe blist bis breached.
Binary bSearch b- bcorrect banswers✔✔Binary bsearch bcompares bthe btarget bvalue bto
bthe bmiddle belement bof ban bordered blist. bThe blist bis bthen bdivided bin b2 bwith beach
bcomparison.
Bubble bsort b- bcorrect banswers✔✔First btwo bitems bto bbe bsorted bare bcompared band
bswapped bif bnecessary b; bthe bsecond bitem bis bthen bcompared bwith bthe bthird
b(swapping bif brequired), bthe bthird bis bcompared bwith bthe bfourth, band bthe bprocess bis