3. Below is an algorithm that draws a triangle. Algorithm i is integer j is integer k is integer n is integer input n for i = 0 to n set j = n while j > i output ‶ ″ set j = j - 1 end while set k = n while k >= n - i output ‶I″ set k = k - 1 end while next i (a) Evaluate the efficiency of the algorithm and, using Big O notation, determine the growth rate for the time performance. [5] (b) Draw a graph of the algorithm above to illustrate its order of time efficiency. Graph paper is not required. [4] (c) Determine the growth rate of memory use during a single run of the algorithm. [2] Turn over 3 A500U101 03 (A500U10-1) © WJEC CBAC Ltd.

Get full Socratic AI guidance on this question — free in the Applaa desktop app
Appy Buddy guides you step-by-step toward the answer without giving it away. Type your attempt and get instant, mark-scheme-aware clues that teach you to think like an examiner.
Join Applaa Community
Create your own games, learn AI concepts, program interactive apps, and share with a kid-safe community approved by parents. Free forever on Windows and Mac.
Available for Windows and macOS · COPPA Compliant
Exam Specification Info
This question is part of the UK A-Level Computer Science syllabus. In the actual exam, structured questions typically require linking specific keywords to gain full marks. Applaa helps you drill these topics.
While Other Kids Get an AI Head Start, Is Yours Falling Behind?
Give your child the same AI app-building, exam prep and tutoring edge — free for the first month, no credit card needed.
Join 10,000+ students building their first AI-powered apps with Applaa