Q15
MCQMarks unknownSuppose you are given arrays and both uninitialized, that is, each location may contain an arbitrary value), and a variable count, initialized to . Consider the following procedures and : set(i) { count = count + 1; q[count] = i; p[i] = count; } is_set(i) { if (p[i] ≤ 0 or p[i] > count) return false; if (q[p[i]] ≠ i) return false; return true; }
Sign in to save attempts.
Loading…