TORONTO KIDS COMPUTER CLUB | Sunday 10:00 Homework
117

# Sunday 10:00 Homework

## 09 NovPMCA Sunday 10:00 Practice -11.07

Question: There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can’t move on red tiles, he...

## 04 NovPMCA Sunday 10:00 Practice -10.31

Question: A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again be split in four sub quadrants, etc. In the quadtree, the image is represented by...

## 28 OctPMCA Sunday 10:00 Practice -10.24

Question: Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday life. At lunch time the queue in front of the Mensa is a team queue, for example. In a team queue...

## 14 OctPMCA Sunday 10:00 Practice -10.17

Question: Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the trees. If the same thing happened to binary trees, how large would the piles of leaves...

## 30 SepPMCA Sunday 10:00 Practice -09.26

Question: You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path is the sum of...

## 23 SepPMCA Sunday 10:00 Practice -09.19

Question: Trees are fundamental in many branches of computer science (Pun definitely intended). Current state-of-the art parallel computers such as Thinking Machines’ CM-5 are based on fat trees. Quad- and octal-trees are fundamental to many algorithms in computer graphics. This problem involves building and traversing binary trees. Given...

## 16 SepPMCA Sunday 10:00 Practice -09.12

Question: You have n boxes in a line on the table numbered 1 . . . n from left to right. Your task is to simulate 4 kinds of commands: 1 X Y : move box X to the left to Y (ignore this if X is...

## 27 AugPMCA Sunday 10:00 Practice -08.22

Question: A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-terminal node. It then keeps moving down, either follows the path of the left subtree, or...

## 21 AugPMCA Sunday 10:00 Practice -08.15

Question: You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem with the keyboard is that sometimes the “home” key or the “end” key gets automatically pressed (internally). You’re not aware of this issue, since you’re focusing on the...

## 13 AugPMCA Sunday 10:00 Practice -08.08

Question: Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary.  However, the number of elementary multiplications needed strongly depends on the evaluation order you choose. For example,...