2023 Beaver Computing Challenge
(Grade 5 & 6)
Questions, Answers, Explanations, and Connections
Five hats are hanging as shown.
In what order should the hats be rehung so that they get taller as you move left to right?
(A) \(R,P,S,T,Q\)
If we order the hats so that they get taller as you move left to right, the result is as shown below.
In computer science, arranging elements into an ordered sequence is called sorting. Sorting is one of the most fundamental problems in computer science. There are many uses of sorting: when clothes are arranged by size and colour in a store, or when the sports standings are shown in descending order. Having data in sorted order helps us make important observations about the data more quickly, such as finding the biggest value, or smallest value, or the top three values, or the middle value, etc.
There are many algorithms to sort elements. An algorithm is a process to accomplish some task. Many sorting algorithms rely on two basic principles: comparing the relative size of two values, and swapping (or exchanging the positions of) those elements. For the original order of the hats, try to think of a process to compare and swap the hats to put them into sorted order.
Lithuania
Beaver Bai has a garden with 9 fence posts around the edge, as shown.
He uses yellow ropes to divide the garden into smaller sections, according to the following rules:
Each section must be in the shape of a triangle.
One rope cannot cross another rope.
Each end of a rope must be attached to a fence post.
Which of the following gardens below could Bai have made?