<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks Chris and Esther – Both very practical examples and they’ll definitely get a run in class!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Trav<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></a></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> sofdev-bounces@edulists.com.au [mailto:sofdev-bounces@edulists.com.au] <b>On Behalf Of </b>BUCKNELL, Chris<br><b>Sent:</b> Wednesday, 15 June 2011 3:38 PM<br><b>To:</b> Year 12 Software Development Teachers' Mailing List<br><b>Subject:</b> Re: [Year 12 SofDev] Binary search example?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Trav,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Try this on for size, it is based on code from the book “Data Structures and Algorithms Using Visual Basic.NET” by Michael McMillan <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards Chris<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><img width=624 height=165 id="Picture_x0020_1" src="cid:image001.png@01CC2B79.2797D1C0" alt="Description: Chris-Bucknell"><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;color:blue'>Module</span><span style='font-family:Consolas'> <span style='color:#2B91AF'>Module1</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Const</span> ARRAY_SIZE <span style='color:blue'>As</span> <span style='color:blue'>Integer</span> = 9 <span style='color:green'>'i.e. 10 item can be stored in the array - VB.NET has zero indexed arrays</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Dim</span> arr(ARRAY_SIZE) <span style='color:blue'>As</span> <span style='color:blue'>Integer</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Sub</span> Main()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:green'>'Fill array with random numbers</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>For</span> index <span style='color:blue'>As</span> <span style='color:blue'>Integer</span> = 0 <span style='color:blue'>To</span> ARRAY_SIZE<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> arr(index) = (<span style='color:blue'>CInt</span>(Int(100 * Rnd() + 1)))<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Next</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:green'>'Sort array</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> SelectionSort()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:green'>'Show sorted array</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> showArray()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:green'>'Find number 77 in array using standard Binary Search</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Dim</span> position <span style='color:blue'>As</span> <span style='color:blue'>Integer</span> = binSearch(77)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>If</span> (position > -1) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:#2B91AF'>Console</span>.WriteLine(<span style='color:#A31515'>"77 found at position "</span> & position.ToString)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Else</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:#2B91AF'>Console</span>.WriteLine(<span style='color:#A31515'>"Not in the array."</span>)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>If</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:green'>'Find number 77 in array using standard Binary Search</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> position = RecursiveBinSearch(77, 0, ARRAY_SIZE)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>If</span> (position > -1) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:#2B91AF'>Console</span>.WriteLine(<span style='color:#A31515'>"77 found at position "</span> & position.ToString)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Else</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:#2B91AF'>Console</span>.WriteLine(<span style='color:#A31515'>"Not in the array."</span>)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>If</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:#2B91AF'>Console</span>.Read()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>Sub</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Public</span> <span style='color:blue'>Function</span> binSearch(<span style='color:blue'>ByVal</span> value <span style='color:blue'>As</span> <span style='color:blue'>Integer</span>) <span style='color:blue'>As</span> <span style='color:blue'>Integer</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Dim</span> upperBound, lowerBound, mid <span style='color:blue'>As</span> <span style='color:blue'>Integer</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> upperBound = ARRAY_SIZE <span style='color:green'>'arr.GetUpperBound(0)</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> lowerBound = 0<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>While</span> (lowerBound <= upperBound)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> mid = (upperBound + lowerBound) \ 2<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>If</span> (arr(mid) = value) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Return</span> mid<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>ElseIf</span> (value < arr(mid)) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> upperBound = mid - 1<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Else</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> lowerBound = mid + 1<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>If</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>While</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Return</span> -1<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>Function</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Public</span> <span style='color:blue'>Function</span> RecursiveBinSearch(<span style='color:blue'>ByVal</span> value <span style='color:blue'>As</span> <span style='color:blue'>Integer</span>, <span style='color:blue'>ByVal</span> lower <span style='color:blue'>As</span> <span style='color:blue'>Integer</span>, <span style='color:blue'>ByVal</span> upper <span style='color:blue'>As</span> <span style='color:blue'>Integer</span>) <span style='color:blue'>As</span> <span style='color:blue'>Integer</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>If</span> (lower > upper) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Return</span> -1<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Else</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Dim</span> mid <span style='color:blue'>As</span> <span style='color:blue'>Integer</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> mid = (upper + lower) \ 2<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>If</span> (value < arr(mid)) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> RecursiveBinSearch(value, lower, mid - 1)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>ElseIf</span> (value = arr(mid)) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Return</span> mid<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Else</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Return</span> RecursiveBinSearch(value, mid + 1, upper)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>If</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>If</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>Function</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Public</span> <span style='color:blue'>Sub</span> SelectionSort()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Dim</span> outer, inner, min, temp <span style='color:blue'>As</span> <span style='color:blue'>Integer</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>For</span> outer = 0 <span style='color:blue'>To</span> ARRAY_SIZE - 1<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> min = outer<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>For</span> inner = outer + 1 <span style='color:blue'>To</span> ARRAY_SIZE<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>If</span> (arr(inner) < arr(min)) <span style='color:blue'>Then</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> min = inner<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>If</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Next</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> temp = arr(outer)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> arr(outer) = arr(min)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> arr(min) = temp<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Next</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>Sub</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Public</span> <span style='color:blue'>Sub</span> showArray()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Dim</span> index <span style='color:blue'>As</span> <span style='color:blue'>Integer</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>For</span> index = 0 <span style='color:blue'>To</span> ARRAY_SIZE<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:#2B91AF'>Console</span>.Write(arr(index) & <span style='color:#A31515'>" "</span>)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>Next</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:#2B91AF'>Console</span>.WriteLine()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'> <span style='color:blue'>End</span> <span style='color:blue'>Sub</span><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-family:Consolas;color:blue'>End</span><span style='font-family:Consolas'> <span style='color:blue'>Module<o:p></o:p></span></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> sofdev-bounces@edulists.com.au [mailto:sofdev-bounces@edulists.com.au] <b>On Behalf Of </b>Travis Parker<br><b>Sent:</b> Wednesday, 15 June 2011 2:47 PM<br><b>To:</b> Year 12 Software Development Teachers' Mailing List<br><b>Subject:</b> [Year 12 SofDev] Binary search example?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Dear All,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I was just wondering if anyone has a VB program (Using dot net 2010) that uses a binary search? I would ideally like to give the class a simple program to demonstrate it in action, and rather than write one from scratch during the exam/reporting time - I’m sure one of my more learned colleagues would have one lying around!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Trav<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p></div></body></html>