Purchase Solution

A Web Page for Binary Searches

Not what you're looking for?

Ask Custom Question

Please help with the following problem.

The sort method, when applied to an array of strings, returns a copy of that array in which the strings appear in alphabetical order. For example, if the variable words stored the array ["foo", "bar", "biz"], then the call words .sort() would return ["bar", "biz", "foo"].

Create a Web page named bin.html that performs binary searches. Like seq.html, this page should contain a text area in which the user can enter a sequence of words and a text box for specifying the word to search for. When the user clicks a button, the page should sort the words in alphabetical order (using the array method sort) and then call a function named BinSearch to perform the search. As in seq.html, the result of the search (either the index at which the word was found or else -- 1) should be displayed in a separate text box.

Purchase this Solution

Solution Summary

The following posting helps with a software development problem. In the solution, the expert helps with a problem that involves creating a web page for conducting binary searches.

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.