שאלות ותשובות - Wet 1 Frequently Asked Questions - Wet 1 Вопросы и Ответы - Wet 1 أسئلة وأجوبة - Wet 1
- 12.04: Added 1.
- 14.04: Added 2.
- 02.05: Added 3.
Q: the arrays we allocate in GetAllTeams are not freed and we get a memory leak. What should we do? |
A: download the latest version of main1.cpp. The arrays are freed correctly in this file.
|
Q: How do you define the median? |
A: It is the object in index ceil(N/2) when the list is sorted from the smallest item to the biggest and indexing begins with 1.
|
Q: What should we return from GetAllTeams if there are no teams in the system? |
A: Allocate two arrays of size 0 and return them with 0 as their size in numOfTeams
|