Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 15 pages
Exam (elaborations)

ESTHER PARK ABDOMINAL PAIN UPDATED ACTUAL EXAM QUESTIONS CORRECT ANSWERS GRADED A

Document preview thumbnail
Preview 2 out of 15 pages

ESTHER PARK ABDOMINAL PAIN UPDATED ACTUAL EXAM QUESTIONS CORRECT ANSWERS GRADED A

Content preview

ESTHER PARK ABDOMINAL PAIN UPDATED ACTUAL EXAM QUESTIONS CORRECT
ANSWERS GRADED A PLUS




Question:
longest common subsequence algo.

Answer:
LCS(X,Y) for i = 0 to n: L(i, 0) = 0 for j = 0 to n: L(0,j) = 0 for i = 1 to n for j = 1 to n if X_i == Y_j:
L(i,j) = L(i - 1, j - 1) + 1 else: L(i,j) = max(L(i - 1, j),L(i,j-1) return(L(i,j)



Question:
longest common substring.

Answer:




Question:
what is Big oh of LCS?

Answer:
O(n**2)



Question:
what is big Oh of longest common substring?

Answer:
O(mn)



Question:

, what is important to remember when calculating longest common subsequence as opposed to
substring?

Answer:
substring is very diagonal and plus 1 subsequence you have to use a max function



Question:
Perform longest common substring and subsequence on: "abcdaf" "3bcdf" What are the
recurrences? write down the algorithm and results.

Answer:




Question:
if you are presented with a coins (1,5,6,8) and your knapsack is k = 11, what is the minimum
number of coins, what would be the computational time, and what is the recurrence?

Answer:
https://www.youtube.com/watch?v=Y0ZqKpToTic



Question:
how to calculate longest increasing substring. Try it using the following: 541208563.

Answer:
It should only require two separate loops: one to loop to go through to calculate the values then a
separate loop to figure out what the max is. and then return the max



Question:
what do you need to remember when it comes to lI subsequence?

Answer:
- you are work with one array you fill everything out with 1s first based on an array of same size the
value is compared as well as the index is compared that is why (a_

Document information

Uploaded on
August 15, 2026
Number of pages
15
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$17.89

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

Sold
1
Followers
0
Items
3365
Last sold
3 weeks 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