I agree (or if I am under 13 my parent or guardian agrees on my behalf) to the terms and conditions of use and that: - My test statistics may be published on the site leaderboard against my username - My teacher(s) can review my test scores - I can receive feedback on my tests from my teacher(s)
Tradition attributes the origin of the motto to Philip II of Macedon. In politics and sociology it is about gaining and maintainng power by breaking up larger concentrations of power into pieces that individually have less power!
In Computing this technique can be divided into the following three parts:
1-Divide: This involves dividing the problem into some sub problem.
2-Conquer: Sub problem by calling recursively until sub problem solved.
3-Combine: The Sub problem Solved so that we will get find problem solution.
The class can act out calls to a merge sort algorithm - see below for an explanation.
Take a shuffled pile of cards with numbers written on them. Creating clones of yourself from students you pass out piles of cards to two others, who each pass half their cards to two more clones they make behind them. This continues till there is a row of people each holding one card only. The cards are then passed back the way they came in a way that means when the cards are passed back to you, magically they are no longer random but now in sorted order.
Algorithm Merge(x, y)
x_pos <- 0, y_pos <- 0, a_pos <- 0
while x_pos < x.length and y_pos < y.length do
if x[x_pos] < y[y_pos] then
a[a_pos] <- x[x_pos]
x_pos <- x_pos + 1
a[a_pos] <- y[y_pos]
y_pos <- y_pos + 1
a_pos <- a_pos + 1
append x[x_pos...x.length] to a
append y[y_pos...y.length] to a