= Functional programming, design and analysis of algorithms
{scope}
{title2=A10097W1}
This is the 13 June 2017 preliminary examination. Questions 1–4 concern <functional programming>; Questions 5–8 concern <algorithm design> and <analysis of algorithms>. All 35 printed subparts are answered. Source paper: https://www.whatdotheyknow.com/request/past_exam_papers_for_1st_year_of/response/1398416/attach/2/Fakour%20Zip%20Final%201.zip?cookie_passthrough=1[released examination archive], member `a10097w1-1.pdf`.
The <Haskell> definitions use separate question namespaces. For Question 1, hide the locally defined names with `import Prelude hiding ((.), zipWith, uncurry)`; for Question 4 use `import Prelude hiding (scanl)`. Alternative `solve` definitions are alternatives, not simultaneous duplicate declarations. Assume finite total puzzle inputs; infinite streams and partial values are treated explicitly where relevant. Operation counts separate numeric bit costs from list and comparison steps.<Haskell 2010 Language Report>[§5.6.2, hiding Prelude names; Chapter 9, Standard Prelude]{ref}
Back to article page