Answer the question
In order to leave comments, you need to log in
How to populate this trace table in pseudocode?
The institute was asked to fill in this trace table using pseudocode. I'm sure the pseudo-code you have is wrong, but the instructor insists otherwise. Please help me to resolve the issue. Detailed explanation is welcome! I show exactly what was in the task
Answer the question
In order to leave comments, you need to log in
IMHO it's wrong, but the pseudo-code is outrageous. Those left arrows and variable names just don't hurt the eyes.
And so, if I understand correctly, you have LoopA counted from 1 to 3, and LoopB from 0 to 0.
Thus, all comparisons are simply incorrect.
We transfer items from Items to Newitems, provided that they have not been seen before (done = false). To fill in the required table, you need to know the contents of Items, because it can be [1, 1, 1, 1], then as a result we get NewItems = [1], and maybe [1, 2, 3, 4], then it will be transferred in its entirety.
And yes, if I understand the pseudocode correctly, then there are no errors in it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question