<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eslifka</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eslifka"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Eslifka"/>
	<updated>2026-06-06T18:00:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11405</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11405"/>
		<updated>2008-04-22T00:45:41Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source Code==&lt;br /&gt;
This is a full implementation of Merge Sort in Java.&lt;br /&gt;
&lt;br /&gt;
===MergeSort Class===&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example Driver Class===&lt;br /&gt;
The MergeSort class can be utilized via a Driver class.  The following is a simple one that calls MergeSort on a randomized array of size 100.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 import java.util.Random;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergSortTest is a driver class for the mergeSort class.&lt;br /&gt;
  * &lt;br /&gt;
  * @author Eric Lifka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class Driver{&lt;br /&gt;
 	&lt;br /&gt;
 	public static void main(String[] args){&lt;br /&gt;
 		Random r = new Random();&lt;br /&gt;
 		MergeSort mergeSort = new MergeSort();&lt;br /&gt;
 		int[] toSort = new int[100];&lt;br /&gt;
 		for (int k = 0; k &amp;lt; toSort.length; k++){&lt;br /&gt;
 			toSort[k] = (int)(r.nextDouble()*100);&lt;br /&gt;
 		}&lt;br /&gt;
 		int[] sorted = mergeSort.sort(toSort);&lt;br /&gt;
 		for (int k = 0; k &amp;lt; toSort.length; k++){&lt;br /&gt;
 			System.out.println(toSort[k] + &amp;quot;     &amp;quot; + sorted[k]);&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11404</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11404"/>
		<updated>2008-04-22T00:43:56Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source Code==&lt;br /&gt;
This is a full implementation of Merge Sort in Java.  Of the many ways available, this one uses arrays.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class can be utilized via a Driver class.  The following is a simple one that calls MergeSort on a randomized array of size 100.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 import java.util.Random;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergSortTest is a driver class for the mergeSort class.&lt;br /&gt;
  * &lt;br /&gt;
  * @author Eric Lifka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class Driver{&lt;br /&gt;
 	&lt;br /&gt;
 	public static void main(String[] args){&lt;br /&gt;
 		Random r = new Random();&lt;br /&gt;
 		MergeSort mergeSort = new MergeSort();&lt;br /&gt;
 		int[] toSort = new int[100];&lt;br /&gt;
 		for (int k = 0; k &amp;lt; toSort.length; k++){&lt;br /&gt;
 			toSort[k] = (int)(r.nextDouble()*100);&lt;br /&gt;
 		}&lt;br /&gt;
 		int[] sorted = mergeSort.sort(toSort);&lt;br /&gt;
 		for (int k = 0; k &amp;lt; toSort.length; k++){&lt;br /&gt;
 			System.out.println(toSort[k] + &amp;quot;     &amp;quot; + sorted[k]);&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11403</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11403"/>
		<updated>2008-04-22T00:43:31Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source Code==&lt;br /&gt;
This is a full implementation of Merge Sort in Java.  Of the many ways available, this one uses arrays.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class can be utilized via a Driver class.  The following is a simple one that calls MergeSort on a randomized array of size 100.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
&lt;br /&gt;
import java.util.Random;&lt;br /&gt;
&lt;br /&gt;
 /**&lt;br /&gt;
  * mergSortTest is a driver class for the mergeSort class.&lt;br /&gt;
  * &lt;br /&gt;
  * @author Eric Lifka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class Driver{&lt;br /&gt;
 	&lt;br /&gt;
 	public static void main(String[] args){&lt;br /&gt;
 		Random r = new Random();&lt;br /&gt;
 		MergeSort mergeSort = new MergeSort();&lt;br /&gt;
 		int[] toSort = new int[100];&lt;br /&gt;
 		for (int k = 0; k &amp;lt; toSort.length; k++){&lt;br /&gt;
 			toSort[k] = (int)(r.nextDouble()*100);&lt;br /&gt;
 		}&lt;br /&gt;
 		int[] sorted = mergeSort.sort(toSort);&lt;br /&gt;
 		for (int k = 0; k &amp;lt; toSort.length; k++){&lt;br /&gt;
 			System.out.println(toSort[k] + &amp;quot;     &amp;quot; + sorted[k]);&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11402</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11402"/>
		<updated>2008-04-22T00:39:47Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source Code==&lt;br /&gt;
This is a full implementation of Merge Sort in Java.  Of the many ways available, this one uses arrays.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11401</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11401"/>
		<updated>2008-04-22T00:39:25Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source Code==&lt;br /&gt;
This is a full implementation of Merge Sort in Java.  Of the many ways available, this one uses arrays.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;blue&amp;gt;/**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&amp;lt;/blue&amp;gt;&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11400</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11400"/>
		<updated>2008-04-22T00:35:21Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source Code==&lt;br /&gt;
This is a full implementation of Merge Sort in Java.  Of the many ways available, this one uses arrays.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11399</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11399"/>
		<updated>2008-04-22T00:32:26Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Psuedocode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
A full version of merge sort written in Java can be found [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC_216/s08/prevent_error/page2 here]&lt;br /&gt;
&lt;br /&gt;
===The Exercise===&lt;br /&gt;
&lt;br /&gt;
The rest of this page is devoted to a learning exercise designed to help students understand Merge Sort.&lt;br /&gt;
&lt;br /&gt;
====Participants and props====&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
====The script====&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11398</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11398"/>
		<updated>2008-04-22T00:29:22Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Psuedocode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
A full version of merge sort written in Java can be found [[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC_216/s08/prevent_error/page2]]&lt;br /&gt;
[[prevent error/page2]]&lt;br /&gt;
&lt;br /&gt;
===The Exercise===&lt;br /&gt;
&lt;br /&gt;
The rest of this page is devoted to a learning exercise designed to help students understand Merge Sort.&lt;br /&gt;
&lt;br /&gt;
====Participants and props====&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
====The script====&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11397</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11397"/>
		<updated>2008-04-22T00:27:51Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source Code==&lt;br /&gt;
This is a full implementation of Merge Sort in Java.  Of the many ways available, this one uses arrays.&lt;br /&gt;
&lt;br /&gt;
 package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11396</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11396"/>
		<updated>2008-04-22T00:26:27Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Psuedocode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
A full version of merge sort written in Java can be found [[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC_216/s08/prevent_error/page2]]&lt;br /&gt;
&lt;br /&gt;
===The Exercise===&lt;br /&gt;
&lt;br /&gt;
The rest of this page is devoted to a learning exercise designed to help students understand Merge Sort.&lt;br /&gt;
&lt;br /&gt;
====Participants and props====&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
====The script====&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11395</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11395"/>
		<updated>2008-04-22T00:25:55Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Psuedocode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
A full version of merge sort written in Java can be found [[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC_216/s08/prevent_error/page2|here]]&lt;br /&gt;
&lt;br /&gt;
===The Exercise===&lt;br /&gt;
&lt;br /&gt;
The rest of this page is devoted to a learning exercise designed to help students understand Merge Sort.&lt;br /&gt;
&lt;br /&gt;
====Participants and props====&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
====The script====&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11394</id>
		<title>CSC 216/s08/prevent error/page2</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error/page2&amp;diff=11394"/>
		<updated>2008-04-22T00:24:06Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Source Code===&lt;br /&gt;
This is a full implementation of Merge Sort in Java.  Of the many ways available, this one uses arrays.&lt;br /&gt;
&lt;br /&gt;
 package mergeSort;&lt;br /&gt;
 &lt;br /&gt;
 /**&lt;br /&gt;
  * mergeSort is an algorithm for sorting a passed array.&lt;br /&gt;
  *&lt;br /&gt;
  * @author Eric LIfka&lt;br /&gt;
  * @version 1.0&lt;br /&gt;
  */&lt;br /&gt;
 public class MergeSort{&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * merge takes two arrays as parameters and returns a sorted array.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param left - one of two arrays to be merged&lt;br /&gt;
 	 * @param right - the other array to be merged&lt;br /&gt;
 	 * @return result - the resulting array&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] merge(int[] left, int[] right){&lt;br /&gt;
 		// Initialize numbers to be used in the merge algorithm&lt;br /&gt;
 		int leftLength = left.length;&lt;br /&gt;
 		int rightLength = right.length;&lt;br /&gt;
 		int leftLocation = 0;&lt;br /&gt;
 		int rightLocation = 0;&lt;br /&gt;
         int resultLocation = 0;&lt;br /&gt;
 		&lt;br /&gt;
 		// Initialize result array to joint length of left and right&lt;br /&gt;
 		int[] result = new int[leftLength + rightLength];&lt;br /&gt;
 		&lt;br /&gt;
 		// the merge algorithm&lt;br /&gt;
 		&lt;br /&gt;
 		// goes through the two arrays adding values to result from smallest to largest&lt;br /&gt;
 		while (leftLocation &amp;lt; leftLength &amp;amp;&amp;amp; rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			if (left[leftLocation] &amp;lt; right[rightLocation]){&lt;br /&gt;
 				result[resultLocation] = left[leftLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 leftLocation ++;&lt;br /&gt;
 			} else {&lt;br /&gt;
                 result[resultLocation] = right[rightLocation];&lt;br /&gt;
                 resultLocation ++;&lt;br /&gt;
                 rightLocation ++;&lt;br /&gt;
             }&lt;br /&gt;
 		}&lt;br /&gt;
 		// these two while loops add whatever's left of the two arrays to the end of result&lt;br /&gt;
         while (leftLocation &amp;lt; leftLength){&lt;br /&gt;
         	result[resultLocation] = left[leftLocation];&lt;br /&gt;
             resultLocation ++;&lt;br /&gt;
             leftLocation ++;&lt;br /&gt;
         }&lt;br /&gt;
 		while (rightLocation &amp;lt; rightLength){&lt;br /&gt;
 			result[resultLocation] = right[rightLocation];&lt;br /&gt;
 			resultLocation ++;&lt;br /&gt;
 			rightLocation ++;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Return the result&lt;br /&gt;
 		return result;&lt;br /&gt;
 	}&lt;br /&gt;
 	&lt;br /&gt;
 	/**&lt;br /&gt;
 	 * sort takes an array, separates it into two equal arrays &lt;br /&gt;
 	 * and calls itself on the two new arrays, sorting the array&lt;br /&gt;
 	 * via recursion.&lt;br /&gt;
 	 *&lt;br /&gt;
 	 * @param source - the array to be sorted&lt;br /&gt;
 	 * @return the sorted version of source&lt;br /&gt;
 	 */&lt;br /&gt;
 	public int[] sort(int[] source){&lt;br /&gt;
 		// Check to see if source is size one and return it if so&lt;br /&gt;
 		if (source.length &amp;lt;= 1){&lt;br /&gt;
 			return source;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Initialize left, right and middle&lt;br /&gt;
 		int middle = source.length / 2;&lt;br /&gt;
 		int[] left = new int[middle];&lt;br /&gt;
 		int[] right = new int[source.length - middle];&lt;br /&gt;
 &lt;br /&gt;
 		// Run through source separating it into left and right&lt;br /&gt;
 		for (int length = 0; length &amp;lt; source.length; length++){&lt;br /&gt;
 			if (length &amp;lt; middle){&lt;br /&gt;
 				left[length] = source[length];&lt;br /&gt;
 			} else {&lt;br /&gt;
 				right[length - middle] = source[length];&lt;br /&gt;
 			}&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 		// Call merge on the sorted version of left and right&lt;br /&gt;
 		return this.merge(this.sort(left), this.sort(right));&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11385</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11385"/>
		<updated>2008-04-21T14:33:31Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The Concept */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===The Exercise===&lt;br /&gt;
&lt;br /&gt;
The rest of this page is devoted to a learning exercise designed to help students understand Merge Sort.&lt;br /&gt;
&lt;br /&gt;
====Participants and props====&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
====The script====&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11384</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11384"/>
		<updated>2008-04-21T14:33:05Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The Concept */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===The Exercise===&lt;br /&gt;
&lt;br /&gt;
The rest of this page is devoted to a learning exercise designed to help students understand Merge Sort.&lt;br /&gt;
&lt;br /&gt;
====Participants and props====&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
====The script====&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11383</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11383"/>
		<updated>2008-04-21T13:57:41Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Merge Sort */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===The Exercise===&lt;br /&gt;
&lt;br /&gt;
The rest of this page is devoted to a learning exercise designed to help students understand Merge Sort.&lt;br /&gt;
&lt;br /&gt;
====Participants and props====&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
====The script====&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11382</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11382"/>
		<updated>2008-04-21T13:55:10Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11381</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11381"/>
		<updated>2008-04-21T13:54:26Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11380</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11380"/>
		<updated>2008-04-21T13:53:09Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* A Diagram */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====A Diagram====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|thumb|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11379</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11379"/>
		<updated>2008-04-21T13:51:32Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Psuedocode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====A Diagram====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 '''function''' mergesort(m)&lt;br /&gt;
     '''var''' ''list'' left, right, result&lt;br /&gt;
     '''if''' length(m) ≤ 1&lt;br /&gt;
         '''return''' m&lt;br /&gt;
     '''else'''&lt;br /&gt;
         '''var''' middle = length(m) / 2&lt;br /&gt;
         '''for each''' x in m '''up to''' middle&lt;br /&gt;
             add x to left&lt;br /&gt;
         '''for each''' x in m '''after''' middle&lt;br /&gt;
             add x to right&lt;br /&gt;
         '''return''' merge(mergesort(left), mergesort(right)&lt;br /&gt;
&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11378</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11378"/>
		<updated>2008-04-21T13:49:23Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Psuedocode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====A Diagram====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function mergesort(m)&lt;br /&gt;
    var list left, right, result&lt;br /&gt;
    if length(m) ≤ 1&lt;br /&gt;
        return m&lt;br /&gt;
    else&lt;br /&gt;
        var middle = length(m) / 2&lt;br /&gt;
        for each x in m up to middle&lt;br /&gt;
            add x to left&lt;br /&gt;
        for each x in m after middle&lt;br /&gt;
            add x to right&lt;br /&gt;
        return merge(mergesort(left), mergesort(right)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&lt;br /&gt;
 '''function''' merge(left,right)&lt;br /&gt;
     '''var''' ''list'' result&lt;br /&gt;
     '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
         '''if''' first(left) ≤ first(right)&lt;br /&gt;
             append first(left) to result&lt;br /&gt;
             left = rest(left)&lt;br /&gt;
         '''else'''&lt;br /&gt;
             append first(right) to result&lt;br /&gt;
             right = rest(right)&lt;br /&gt;
     '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
         append rest(left) to result&lt;br /&gt;
     '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
         append rest(right) to result&lt;br /&gt;
     '''return''' result&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11377</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11377"/>
		<updated>2008-04-21T13:48:47Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Merge Sort */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
====A Diagram====&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
====Psuedocode====&lt;br /&gt;
Heres a pseudocode version of mergesort.  This is a two method implementation.  The first method handles the dividing of the lists, the second is a merge method, it takes two lists and collapses them into one.  The algorithm can easily be done with one method, but it complicates the code unnecessarily.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function mergesort(m)&lt;br /&gt;
    var list left, right, result&lt;br /&gt;
    if length(m) ≤ 1&lt;br /&gt;
        return m&lt;br /&gt;
    else&lt;br /&gt;
        var middle = length(m) / 2&lt;br /&gt;
        for each x in m up to middle&lt;br /&gt;
            add x to left&lt;br /&gt;
        for each x in m after middle&lt;br /&gt;
            add x to right&lt;br /&gt;
        return merge(mergesort(left), mergesort(right)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The merge algorithm can be done in many ways, this is a simple one.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
'''function''' merge(left,right)&lt;br /&gt;
    '''var''' ''list'' result&lt;br /&gt;
    '''while''' length(left) &amp;gt; 0 '''and''' length(right) &amp;gt; 0&lt;br /&gt;
        '''if''' first(left) ≤ first(right)&lt;br /&gt;
            append first(left) to result&lt;br /&gt;
            left = rest(left)&lt;br /&gt;
        '''else'''&lt;br /&gt;
            append first(right) to result&lt;br /&gt;
            right = rest(right)&lt;br /&gt;
    '''if''' length(left) &amp;gt; 0 &lt;br /&gt;
        append rest(left) to result&lt;br /&gt;
    '''if''' length(right) &amp;gt; 0 &lt;br /&gt;
        append rest(right) to result&lt;br /&gt;
    '''return''' result&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11376</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11376"/>
		<updated>2008-04-21T13:35:31Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Merge Sort */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===The Algorithm===&lt;br /&gt;
&lt;br /&gt;
Before going over the exercise we will use this section to briefely explain merge sort itself with an idea towards making the exercise easier to understand.  &lt;br /&gt;
&lt;br /&gt;
====The Concept====&lt;br /&gt;
Merge Sort runs in the following way.&lt;br /&gt;
#Divide the unsorted list in half creating two unsorted lists.&lt;br /&gt;
#Divide each of these lists in half recursively until we have all lists of size one.&lt;br /&gt;
#Merge these lists to create one sorted list.&lt;br /&gt;
&lt;br /&gt;
There are two key ideas behind merge sort.&lt;br /&gt;
#A smaller list is easier to sort than a large list.&lt;br /&gt;
#Two lists that are already sorted are easier to merge into a sorted list than two unsorted lists.&lt;br /&gt;
&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11274</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11274"/>
		<updated>2008-04-16T14:27:38Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;br /&gt;
&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram taken from [http://en.wikipedia.org/wiki/Merge_sort Wikipedia]]]&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11273</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11273"/>
		<updated>2008-04-16T14:26:34Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;br /&gt;
&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram taken from http://www.wikipedia.com]]&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Merge_sort_algorithm_diagram.svg.png&amp;diff=11272</id>
		<title>File:Merge sort algorithm diagram.svg.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Merge_sort_algorithm_diagram.svg.png&amp;diff=11272"/>
		<updated>2008-04-16T14:25:42Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11271</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11271"/>
		<updated>2008-04-16T14:25:23Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;br /&gt;
&lt;br /&gt;
[[Image:Merge sort algorithm diagram.svg.png|frame|An easy to follow diagram]]&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11270</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11270"/>
		<updated>2008-04-16T14:15:07Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11269</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11269"/>
		<updated>2008-04-16T14:14:52Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
#1  Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
#2  Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
#3  Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
*NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11268</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11268"/>
		<updated>2008-04-16T14:14:21Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
*1  Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
*2  Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
*3  Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
**NOTE Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11267</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11267"/>
		<updated>2008-04-16T14:12:31Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Merge Sort */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
====1====  &lt;br /&gt;
Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
====2====&lt;br /&gt;
Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
====3====&lt;br /&gt;
Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
=====NOTE=====&lt;br /&gt;
Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11266</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11266"/>
		<updated>2008-04-16T14:10:53Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Merge Sort */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
===1===  &lt;br /&gt;
Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
===2===&lt;br /&gt;
Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
===3===&lt;br /&gt;
Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
===NOTE===&lt;br /&gt;
Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11265</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11265"/>
		<updated>2008-04-16T14:10:17Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
===ONE===  Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
&lt;br /&gt;
===2===  Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
===3===  Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
===NOTE===&lt;br /&gt;
Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11264</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11264"/>
		<updated>2008-04-16T14:09:46Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
===1===  Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.&lt;br /&gt;
===2===  Using the left of the two new lines of students, check to see that the length is greater than 1, if so repeat steps one and two on this new line of students.  If the size of the line reaches one, go to step three.&lt;br /&gt;
===3===  Having reached the smallest fracture of a line segment (ie both sides are one) or having two segments that are previously sorted, the two segments should be merged together.  This is done by comparing shortest, or leftmost elements, the shortest is added to a new line, on the left, then the same comparison is made of the two shortest elements of the lists, and in this fashion the two lists are compiled together into one sorted list.  This new list is then merged with the next sorted list.  If the next list is as yet unsorted, repeat steps 1-2 on it until it is so.&lt;br /&gt;
===NOTE===&lt;br /&gt;
Merge sort can tend to be complicated, this explanation is not the best, and will hopefully be refined.  A picture has been included to help with the process.  The idea is to use merge sort on a line of students, explaining the steps along the way so has to help with comprehension of how merge sort works.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11263</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11263"/>
		<updated>2008-04-16T04:52:06Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
1.  Check to see if there is only one student in the line&lt;br /&gt;
1.  Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.  NOTE: when the line of students has an odd number, the larger half should be the one on the right.&lt;br /&gt;
2.&lt;br /&gt;
--sorry, will finish asap---&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11262</id>
		<title>CSC 216/s08/prevent error</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/prevent_error&amp;diff=11262"/>
		<updated>2008-04-16T04:51:53Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Place Title of Exercise Here */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Merge Sort==&lt;br /&gt;
&lt;br /&gt;
The underlying method of merge sort.&lt;br /&gt;
&lt;br /&gt;
===The problem===&lt;br /&gt;
&lt;br /&gt;
Merge sort is the quickest and most efficient of sorting methods, but it is run by an underlying concept that is not necessarily easy to grasp.  It is our goal to make it more understandable.&lt;br /&gt;
&lt;br /&gt;
===Participants and props===&lt;br /&gt;
&lt;br /&gt;
This exercise can be done with any number of students.  Preferably there should be ten or more students participating.  No other props are required.&lt;br /&gt;
&lt;br /&gt;
===The script===&lt;br /&gt;
&lt;br /&gt;
We shall teach merge sort by sorting a group of students.  There are many ways that students can be sorted,  for this example we shall use height.&lt;br /&gt;
A group of students should be arranged at the front of the room in a line.  Follow the following steps.&lt;br /&gt;
1.  Check to see if there is only one student in the line&lt;br /&gt;
1.  Divide the line of students in two down the middle by moving the right half to the right and the left half to the left.  NOTE: when the line of students has an odd number, the larger half should be the one on the right.&lt;br /&gt;
2.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=11087</id>
		<title>CSC 216/s08/cultivate virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=11087"/>
		<updated>2008-04-04T08:23:16Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The Exercise ... dum dum dum */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Alphabet Soup==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Oriented Instruction===&lt;br /&gt;
Many students enter csc 216 with very little idea of what it is for a programming language to be 'object oriented.'  Our goal is to help students understand the benefits of a system that allows for black box architecture in a closed source environment.&lt;br /&gt;
&lt;br /&gt;
===Required Resources===&lt;br /&gt;
For this exercise participating students will want to be close to a white board and have access to a working dry erase marker.  No other resources are needed.&lt;br /&gt;
&lt;br /&gt;
===The Exercise ... dum dum dum===&lt;br /&gt;
The idea here is to create a working human powered version of a sentence writing class.  Obviously such a thing is not actually useful or even logical in a Java environment but we feel that it's a great way of explaining the power of object oriented programming.&lt;br /&gt;
&lt;br /&gt;
First, the architecture.  &lt;br /&gt;
-At the lowest level are the letters.  Students will be given a group of letters that fall within their jurisdiction.  For example, the vowel class student would have a,e,i,o, and u under their control.  As many or as few letters as desired can get given to any individual student.  Punctuation marks can also be included here if desired.  The job of each student of the letter class category is simple.  When called (which is as simple as a higher class saying &amp;quot;I need an 'a' or I need a capitol 'a'&amp;quot;) the student writes the required letter/punctuation mark at the next available place on the board.  The student in charge of spaces should make some identifying mark, such as an underscore to designate a space.&lt;br /&gt;
&lt;br /&gt;
-At the level above the letters are the word classes.  There are nine of these (noun, verb, adjective, adverb, preposition, conjunction, and interjection).  One of these should be given to each of nine students.  The job of these classes is a little more interesting than that of their letter brethren.  When called, it is their job to come up with a word that fits their category; so for example, when noun is called (again, by someone of a higher class saying &amp;quot;I need a noun&amp;quot;) the noun class person might come up with the noun ball, or tree, or anything they so desire, much in the spirit of ad libs.  Having come up with a word, the class then makes calls to the letter classes in order to 'print' the desired word to the board.&lt;br /&gt;
&lt;br /&gt;
-We will have one class that acts as manager.  This is the class that makes calls to noun and verb and etc.  It is also this classes responsibility to make a call to 'space' between words.  The creativity of this class can allow the exercise to be entertaining and fun.&lt;br /&gt;
&lt;br /&gt;
===Thoughts===&lt;br /&gt;
This exercise doesn't encompass sections of Java that are necessarily hard to understand.  Instead it strives to help students get into an object oriented mindset.  The ability to program cannot truly be taught.  Instead we can only help students to try and understand how an object oriented language like Java works.  Once students begin to grasp the power inherent to a language like Java.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=11086</id>
		<title>CSC 216/s08/cultivate virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=11086"/>
		<updated>2008-04-04T08:22:55Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Alphabet Soup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Alphabet Soup==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Oriented Instruction===&lt;br /&gt;
Many students enter csc 216 with very little idea of what it is for a programming language to be 'object oriented.'  Our goal is to help students understand the benefits of a system that allows for black box architecture in a closed source environment.&lt;br /&gt;
&lt;br /&gt;
===Required Resources===&lt;br /&gt;
For this exercise participating students will want to be close to a white board and have access to a working dry erase marker.  No other resources are needed.&lt;br /&gt;
&lt;br /&gt;
===The Exercise ... dum dum dum===&lt;br /&gt;
The idea here is to create a working human powered version of a sentence writing class.  Obviously such a thing is not actually useful or even logical in a Java environment but we feel that it's a great way of explaining the power of object oriented programming.&lt;br /&gt;
&lt;br /&gt;
First, the architecture.  &lt;br /&gt;
-At the lowest level are the letters.  Students will be given a group of letters that fall within their jurisdiction.  For example, the vowel class student would have a,e,i,o, and u under their control.  As many or as few letters as desired can get given to any individual student.  Punctuation marks can also be included here if desired.  The job of each student of the letter class category is simple.  When called (which is as simple as a higher class saying &amp;quot;I need an 'a' or I need a capitol 'a'&amp;quot;) the student writes the required letter/punctuation mark at the next available place on the board.  The student in charge of spaces should make some identifying mark, such as an underscore to designate a space.&lt;br /&gt;
&lt;br /&gt;
-At the level above the letters are the word classes.  There are nine of these (noun, verb, adjective, adverb, preposition, conjunction, and interjection).  One of these should be given to each of nine students.  The job of these classes is a little more interesting than that of their letter brethren.  When called, it is their job to come up with a word that fits their category; so for example, when noun is called (again, by someone of a higher class saying &amp;quot;I need a noun&amp;quot;) the noun class person might come up with the noun ball, or tree, or anything they so desire, much in the spirit of ad libs.  Having come up with a word, the class then makes calls to the letter classes in order to 'print' the desired word to the board.&lt;br /&gt;
&lt;br /&gt;
-We will have one class that acts as manager.  This is the class that makes calls to noun and verb and etc.  It is also this classes responsibility to make a call to 'space' between words.  The creativity of this class can allow the exercise to be entertaining and fun.&lt;br /&gt;
&lt;br /&gt;
This exercise doesn't encompass sections of Java that are necessarily hard to understand.  Instead it strives to help students get into an object oriented mindset.  The ability to program cannot truly be taught.  Instead we can only help students to try and understand how an object oriented language like Java works.  Once students begin to grasp the power inherent to a language like Java.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10900</id>
		<title>CSC 216/s08/cultivate virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10900"/>
		<updated>2008-03-27T18:48:35Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The exercise will include each student in the class.  26 of the students will need access to either letter stamps or dry erase markers. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Alphabet Soup==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The goal is to teach students about object oriented concepts and multi class/method architectures in programming Java.===&lt;br /&gt;
&lt;br /&gt;
===The exercise will include each student in the class.  26 of the students will need access to either letter stamps or dry erase markers.===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The class will create a sentence construction package which will be used for several 'ad lib' type exercises.  Numbers allowing 26 students will each be a letter.  Preferably each person who is a letter has access to a stamp of their letter, another option would be to simply use a dry erase board for writing on.  7 students will each represent classes pertaining to noun, verb, adjective, adverb, preposition, conjunction, and interjection.  One person will be the overall package 'driver.'  It is this person's job to say, &amp;quot;Alright, I need a noun, I will call my noun class,&amp;quot; or &amp;quot;I need a verb, I'll make a call to my verb class.&amp;quot;  Upon being called, the noun class person then comes up with a word that fits his/her bill (ie a noun) and makes appropriate calls to the people of the letter classes.  The letter classes, upon being called, write or stamp their letter in the next position on the board.&lt;br /&gt;
&lt;br /&gt;
A slightly different version, which makes use of methods, and a slightly smaller class/fewer participating students would group letters into one class with multiple methods.  Fore example, one student would be the vowel class and would have the methods printA, printE, printI, printO, printU (we'll leave y to the consonants for this exercise).  And similar groupings of letters would be used for other students, such as b,c,d,f,g or some appropriate amount for the number of participating students.  Then when the noun class decided to print 'hobgoblin' he/she would call a class .printH then vowels.printO, and so on and so forth.&lt;br /&gt;
&lt;br /&gt;
While not perfect, this setup allows students to see how they can create classes with methods that other classes can also use.  It should help break the &amp;quot;I'll use one class with one main method&amp;quot; that many students carry.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10899</id>
		<title>CSC 216/s08/cultivate virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10899"/>
		<updated>2008-03-27T18:48:18Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* Alphabet Soup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Alphabet Soup==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The goal is to teach students about object oriented concepts and multi class/method architectures in programming Java.===&lt;br /&gt;
&lt;br /&gt;
===The exercise will include each student in the class.  26 of the students will need access to either letter stamps or dry erase markers.===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The class will create a sentence construction package which will be used for several 'ad lib' type exercises.  Numbers allowing 26 students will each be a letter.  Preferably each person who is a letter has access to a stamp of their letter, another option would be to simply use a dry erase board for writing on.  7 students will each represent classes pertaining to noun, verb, adjective, adverb, preposition, conjunction, and interjection.  One person will be the overall package 'driver.'  It is this person's job to say, &amp;quot;Alright, I need a noun, I will call my noun class,&amp;quot; or &amp;quot;I need a verb, I'll make a call to my verb class.&amp;quot;  Upon being called, the noun class person then comes up with a word that fits his/her bill (ie a noun) and makes appropriate calls to the people of the letter classes.  The letter classes, upon being called, write or stamp their letter in the next position on the board.&lt;br /&gt;
&lt;br /&gt;
A slightly different version, which makes use of methods, and a slightly smaller class/fewer participating students would group letters into one class with multiple methods.  Fore example, one student would be the vowel class and would have the methods printA, printE, printI, printO, printU (we'll leave y to the consonants for this exercise).  And similar groupings of letters would be used for other students, such as b,c,d,f,g or some appropriate amount for the number of participating students.  Then when the noun class decided to print 'hobgoblin' he/she would call a class .printH then vowels.printO, and so on and so forth.&lt;br /&gt;
&lt;br /&gt;
While not perfect, this setup allows students to see how they can create classes with methods that other classes can also use.  It should help break the &amp;quot;I'll use one class with one main method&amp;quot; that many students carry.===&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10898</id>
		<title>CSC 216/s08/cultivate virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10898"/>
		<updated>2008-03-27T18:47:50Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: /* The goal is to teach students about object oriented concepts and multi class/method architectures in programming Java. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Alphabet Soup==&lt;br /&gt;
&lt;br /&gt;
Give the title of your exercise, which may include the name of the topic you are covering, or some other catchy title.&lt;br /&gt;
&lt;br /&gt;
===The goal is to teach students about object oriented concepts and multi class/method architectures in programming Java.===&lt;br /&gt;
&lt;br /&gt;
===The exercise will include each student in the class.  26 of the students will need access to either letter stamps or dry erase markers.===&lt;br /&gt;
&lt;br /&gt;
How many students will participate?  What else do you need (e.g., old tennis ball, Powerpoint slides, software).&lt;br /&gt;
&lt;br /&gt;
===The class will create a sentence construction package which will be used for several 'ad lib' type exercises.  Numbers allowing 26 students will each be a letter.  Preferably each person who is a letter has access to a stamp of their letter, another option would be to simply use a dry erase board for writing on.  7 students will each represent classes pertaining to noun, verb, adjective, adverb, preposition, conjunction, and interjection.  One person will be the overall package 'driver.'  It is this person's job to say, &amp;quot;Alright, I need a noun, I will call my noun class,&amp;quot; or &amp;quot;I need a verb, I'll make a call to my verb class.&amp;quot;  Upon being called, the noun class person then comes up with a word that fits his/her bill (ie a noun) and makes appropriate calls to the people of the letter classes.  The letter classes, upon being called, write or stamp their letter in the next position on the board.&lt;br /&gt;
&lt;br /&gt;
A slightly different version, which makes use of methods, and a slightly smaller class/fewer participating students would group letters into one class with multiple methods.  Fore example, one student would be the vowel class and would have the methods printA, printE, printI, printO, printU (we'll leave y to the consonants for this exercise).  And similar groupings of letters would be used for other students, such as b,c,d,f,g or some appropriate amount for the number of participating students.  Then when the noun class decided to print 'hobgoblin' he/she would call a class .printH then vowels.printO, and so on and so forth.&lt;br /&gt;
&lt;br /&gt;
While not perfect, this setup allows students to see how they can create classes with methods that other classes can also use.  It should help break the &amp;quot;I'll use one class with one main method&amp;quot; that many students carry.===&lt;br /&gt;
&lt;br /&gt;
Describe how to do your exercise.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10897</id>
		<title>CSC 216/s08/cultivate virtue</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216/s08/cultivate_virtue&amp;diff=10897"/>
		<updated>2008-03-27T18:46:35Z</updated>

		<summary type="html">&lt;p&gt;Eslifka: Alphabet Soup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Formatting Resources===&lt;br /&gt;
[http://meta.wikimedia.org/wiki/Help:Wikitext_examples Formatting Help Guide from MetaWiki]&lt;br /&gt;
&lt;br /&gt;
==Alphabet Soup==&lt;br /&gt;
&lt;br /&gt;
Give the title of your exercise, which may include the name of the topic you are covering, or some other catchy title.&lt;br /&gt;
&lt;br /&gt;
===The goal is to teach students about object oriented concepts and multi class/method architectures in programming Java.===&lt;br /&gt;
&lt;br /&gt;
Describe what you are attempting to teach students by this exercise.&lt;br /&gt;
&lt;br /&gt;
===The exercise will include each student in the class.  26 of the students will need access to either letter stamps or dry erase markers.===&lt;br /&gt;
&lt;br /&gt;
How many students will participate?  What else do you need (e.g., old tennis ball, Powerpoint slides, software).&lt;br /&gt;
&lt;br /&gt;
===The class will create a sentence construction package which will be used for several 'ad lib' type exercises.  Numbers allowing 26 students will each be a letter.  Preferably each person who is a letter has access to a stamp of their letter, another option would be to simply use a dry erase board for writing on.  7 students will each represent classes pertaining to noun, verb, adjective, adverb, preposition, conjunction, and interjection.  One person will be the overall package 'driver.'  It is this person's job to say, &amp;quot;Alright, I need a noun, I will call my noun class,&amp;quot; or &amp;quot;I need a verb, I'll make a call to my verb class.&amp;quot;  Upon being called, the noun class person then comes up with a word that fits his/her bill (ie a noun) and makes appropriate calls to the people of the letter classes.  The letter classes, upon being called, write or stamp their letter in the next position on the board.&lt;br /&gt;
&lt;br /&gt;
A slightly different version, which makes use of methods, and a slightly smaller class/fewer participating students would group letters into one class with multiple methods.  Fore example, one student would be the vowel class and would have the methods printA, printE, printI, printO, printU (we'll leave y to the consonants for this exercise).  And similar groupings of letters would be used for other students, such as b,c,d,f,g or some appropriate amount for the number of participating students.  Then when the noun class decided to print 'hobgoblin' he/she would call a class .printH then vowels.printO, and so on and so forth.&lt;br /&gt;
&lt;br /&gt;
While not perfect, this setup allows students to see how they can create classes with methods that other classes can also use.  It should help break the &amp;quot;I'll use one class with one main method&amp;quot; that many students carry.===&lt;br /&gt;
&lt;br /&gt;
Describe how to do your exercise.&lt;/div&gt;</summary>
		<author><name>Eslifka</name></author>
	</entry>
</feed>