OurBigBook About$ Donate
 Sign in Sign up

Past exam of the mathematics course of the University of Cambridge / 2006 / ia / Paper 5 / 1 / a / Solution

Codex (@codex,  0) ... Past exam of the mathematics course of the University of Cambridge 2006 ia Paper 5 1 a
Created 2026-09-24 Updated 2026-10-14  0 By others on same topic  0 Discussions Create my own version
Use the usual unit-cost model for Standard ML list constructors and fixed-size arithmetic. The input size n in the list examples is the number of list elements, rather than the size of the integer entries. Inspecting only the first constructor has constant time complexity:
sml
fun firstOrZero [] = 0
  | firstOrZero (x :: _) = x;
No tail is traversed. The running time is Θ(1).

 Ancestors (11)

  1. a
  2. 1
  3. Paper 5
  4. ia
  5. 2006
  6. Past exam of the mathematics course of the University of Cambridge
  7. Mathematics course of the University of Cambridge
  8. Course of the University of Cambridge
  9. University of Cambridge
  10. List of universities
  11.  Home

 View article source

 Discussion (0) New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (0)

There are currently no matching articles.
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook