Explore BrainMass
Share

A Web Page for Binary Searches

This content was STOLEN from BrainMass.com - View the original, and get the solution, here!

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.

© BrainMass Inc. brainmass.com September 25, 2018, 9:16 am ad1c9bdddf - https://brainmass.com/computer-science/searching/web-page-binary-searches-198234

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.

$2.19