# Zadanie domowe #4

{% hint style="danger" %}
Do oceny można zgłosić maksymalnie trzy wybrane zadania domowe.
{% endhint %}

{% hint style="info" %}
Materiały pomocnicze do zadania znajdują się w [repozytorium na GitHub](https://github.com/karolpiczak-pw/2019Z-AISDI/tree/master/homework/04-heaps).
{% endhint %}

**Nazwa repozytorium z rozwiązaniem:** `AISDI-HW 4: Nazwisko`

### Treść zadania

Dla podanego [szablonu klasy kopca binarnego](https://github.com/karolpiczak-pw/2019Z-AISDI/blob/master/homework/04-heaps/minmax_heap.cpp) `ReversibleHeap` proszę zaimplementować metodę `reverse()`, która będzie przełączała działanie kopca pomiędzy wariantem *min-heap* i *max-heap.* Metoda powinna działać w miejscu (*in-place*) w czasie $$O(n)$$.

{% hint style="info" %}
Dla zadania dopuszczalna jest tylko implementacja w C++ na podstawie załączonego szablonu.
{% endhint %}


---

# 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://pw.karolpiczak.com/dydaktyka/2019z-aisdi-cwiczenia/zadanie-domowe-4.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.
