• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 3 pages
Exam (elaborations)

DSA 3. Algorithms & Strategies Questions with Accurate Answers

Document preview thumbnail
Preview 1 out of 3 pages

DSA 3. Algorithms & Strategies

Content preview

DSA 3. Algorithms & Strategies

Brute-force - answer Algorithm strategy consisting of systematically enumerating and
testing every possible candidate solution.

Greedy - answer Algorithm strategy that finds the locally optimal solution at each step in
an attempt to find the globally optimal solution.

Divide-and-conquer - answer Algorithm strategy that divides the main problem into
smaller/similar subproblems, recursively solves them, and combines them into a main
solution.

Dynamic programming - answer Algorithm strategy that divides the main problem into
smaller/similar subproblems but also memoizes the solutions to overlapping
subproblems and applies stored solutions to subsequent repeat subproblems.

Linear search - answerFinds an element in a list by sequentially checking each item
until a match is found.

Binary search - answerFinds an element in a sorted list by dividing it in half and
comparing the target value with the middle value. If not equal, repeat recursively on the
left/right half, until a match or null is found.

Hash search - answerFinds an element in a collection by producing a unique index
based on the element key and retrieving the element at the produced index of the
collection.

Breadth-first search - answerFinds an element in a tree or graph by starting at a root
and exploring elements at the same level before moving to another depth level.

Depth-first search - answerFinds an element in a tree or graph by starting at a root and
exploring elements as far as possible along each branch before backtracking.

Kruskal's MST algorithm - answerA greedy algorithm for producing a minimum-spanning
tree from an undirected weighted graph by repeatedly picking the smallest weight edge
without creating a cycle until all vertices are connected.

Prim's MST algorithm - answerA greedy algorithm for producing a minimum-spanning
tree from an undirected weighted graph by picking an arbitrary vertex, then repeatedly
picking the subsequent smallest weight edge to the next unvisited vertex until all
vertices are connected.

Document information

Uploaded on
August 29, 2024
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Dreamer252
4.0
(117)
Sold
497
Followers
297
Items
21575
Last sold
1 month ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions