# 10.4. Quiz

## Tower of Hanoi

Write a report `quiz9.pdf` that includes answers to the followings.

* As `n` increases from `1` to `10`,  how many times does the auxiliary `solve()` method get called recursively in [`HanoiRecursive`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/dynamic/hanoi/HanoiRecursive.java) and [`HanoiDynamic`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/dynamic/hanoi/HanoiDynamic.java)?
* Is there clear patterns between `n` and the number of the method calls made by these classes? Explain the patterns if exist.

## Longest Common Subsequence

Include answers to the followings in `quiz9.pdf`:

* Explain what the values of the dynamic table mean in the [`LCSDynamic`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/dynamic/lcs/LCSDynamic.java) class.
* `LCSDynamic` pre-populates the dynamic table before making any recursive calls.  Is it possible to find a LCS with dynamic programming by populating the dynamic table while making recursive class.

{% hint style="info" %}
You may need a different type of a dynamic table to populate it while making recursive calls.
{% endhint %}

## Extra Credit

* Create the [`LCSQuiz`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/dynamic/lcs/LCSQuiz.java) class under the [`dynamic.lcs`](https://github.com/emory-courses/dsa-java/blob/master/src/main/java/edu/emory/cs/dynamic/lcs) package.
* Update the `solveAll()` that returns all longest common subsequences between two strings.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emory.gitbook.io/dsa-java/dynamic-programming/exercises.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
