.. (לתיקייה המכילה) | ||
Questions 2, 4: When we are asked to write a recursive | |
You can choose the option which is more convenient for you |
Question 2: Is there any assumption on the range of the variables in | |
No. They can be any int value |
Question 2: Can I define an array in the size of the range of int, so I will be | |
No. Defining an array of such a huge size is not practical. |
Question 2: | |
You are only requested to implement the function printOnlyOneTime(), but if you want to write also main() and a function that gets the input from the user, that’s ok. For that input function (only), you can use loops. |
Question 3: | |
If you've downloaded the assignment before August 14th, you're right. Please download again the new version. |
Question 4: | |
Yes. |
Question 2: | |
Yes. |
Question 4: | |
If you've downloaded the assignment before August 23th, you're right. Please download again the new version (ex6.1.02.pdf). |
Question 4: | |
The range should be 0 to (DAYS_NUM-1). But, since there was a mistake in last versions files, both approaches will be accepted. (But when you hold one of the approaches, stay consistent with it during the whole question). |
Question 4: | |
In backtracking questions, usually the time complexity is exponential, and the space complexity is polynomial. If you did the exercise correctly, this should also be your complexity here. But, we don't demand that here. (Just notice, that if you got a different complexity in your answer, it might indicate that you did something wrong). |
Question 4: | |
You should try to avoid using global variables. |
Question 4: | |
There are ORDER_NUM orders: From 0 to (ORDER_NUM-1) |
Question 3: | |
Notice, unit propagation happens only when there is one unassigned variable left in a clause that will determine the value of this clause. If there is a clause that has one unassigned variable left, but it is known from the already assigned variables that this clause will be TRUE, then unit propagation shouldn't happen in this case. |