Ready to begin
No records have been processed. Start with Next step.
Choose a lab to revisit any idea, then try the questions without opening the answer. Explain the list’s element type, its ordering, whether repeats matter, and what each variable means.
Follow one occurrence at a time. Choose another input to test empty lists, repeated IDs and different parameters.
Ready
No records have been processed. Start with Next step.
Predict the next change, then step through the list. The original course records remain unchanged.
What is the outer length of [[3,53],[24,72],[12,64]]?
3. The outer list has three pair elements, each with two components.
Evaluate [1,13] ++ [] ++ [2,17,1].
[1,13,2,17,1]. Empty concatenation adds nothing; repeated values stay.
What is first(rest([3,42,53]))?
42. rest gives [42,53], whose first element is 42.
What is last(init([3,42,53]))?
42. init gives [3,42], whose last element is 42.
Does first(rest([3])) return 3?
No. rest([3]) is [], so first of that empty list is undefined.
For L = [3,3,25], reconstruct L from first and rest.
[first(L)] ++ rest(L) = [3] ++ [3,25] = [3,3,25].
What does a raw nested intersection of [3,3] and [3,3] append?
Four occurrences of 3, one per matching pair of positions. Add a uniqueness rule if set-style output is intended.
Why is the third-highest distinct Physics cutoff 88 even though several students score 92?
Repeated 92 scores share one mark level. The distinct levels are 92,91,88.
What are the all-three subject topper IDs?
[11]. Maths ∩ Physics is [11,23]; intersecting Chemistry removes 23.
Can the fourth subject Biology be read from the supplied scores?
No. It is a hypothetical extension in the lecture. The actual dataset contains Maths, Physics and Chemistry.
How many neighbour comparisons does a successful sortedness check need for 30 elements?
29 adjacent comparisons, apart from helper-function implementation costs.
Is dismal immediately followed by the noun building?
No. Yellow is between them. The immediate adjective–noun pair is yellow–building.
How many adjacent vowel pairs occur in aaaa?
Three: positions 1–2, 2–3 and 3–4. Overlap is allowed.
Does matching the endpoints of abca prove it a palindrome?
No. Removing the matching outer a characters leaves b and c, which differ.
What update is needed when a new maximum is strictly larger?
Replace both the maximum value and its owner list; begin the new owner list with just this ID.
Are [ID,Physics] and [ID1,ID2] interchangeable pair schemas?
No. They have the same list length but different meanings. Algorithms must know which fields each position contains.
Does “within ten” form a transitive relation?
Not generally. 74 is within ten of 81 and 81 within ten of 85, but 74 and 85 are eleven apart.
How many Bill 1 food triples are there, and what do they count?
Five, counting food item rows. They do not count units, quantities or distinct categories.
What assumption is needed to use the endpoints for minimum and maximum?
The list must be non-empty and ordered non-decreasingly by that numeric property.
Why is the lecture’s mean position difference not a population conclusion?
The ten students were selected for low Maths marks and tied-position conventions affect the measure. It is a descriptive calculation for that setup.