![]() |
.. (לתיקייה המכילה) | |
In Question #1: When you say to keep the order of the ants' ID's, do you mean the order in which they were given or the sorted order? | |
The sorted order. For example, if you were given ID 3, then 2, then 5, then 1, the order of the ID in the array should be: 3 2, 3 2, 3, 5 1, 2, 3, 5 |
In Question #1:in what order exactly do the ants change the board and what happens in each round? | |
In each round, all the ants change the board. For example, if we have ants 1,2,3 and 2 rounds, the program will run like this: Round 1: Ant 1 changes the board and moves Ant 2 changes the board and moves Ant 3 changes the board and moves End of round 1 Round 2: Ant 1 changes the board and moves Ant 2 changes the board and moves Ant 3 changes the board and moves End of round 2 |
In Question #2, in the .h file the function updateHistory has a third parameter of type int which is not written in the PDF. What is it for, and can I delete it from the signature? | |
You may not delete it, as you .c file has to compile with the .h file we published. The third parameter is the current size of the history (which will eventually set on HITORY_LEN), which you can use to iterate over the history array when looking for matching strings. |
In Question #2: Until when are we supposed to handle words from the user? | |
Until you get an EOF. |
In Question#2, can we assume that between the dictionary and the words from the user there is an '\n'? | |
Yes. |