Sort an array and search for a value in that array using binary search. The program language is Javascript, with a little bit of jQuery, HTML, and CSS.
-
Build a visual representation of the sorting process using Javascript, jQuery, and HTML.
-
Show the search process using Javascript, jQuery, and CSS.
These are the initial problems that I want to solve. The sort algorithm should be seen in real time, i.e, I want the sorting process to happen visually on the HTML page. So you will see each element being moved to it's respective position until the entire array is sorted.
Ultimately, the user will be greeted with a screen and asked to input some number. Alternatively, the numbers are randomly generated from say their DOB. They then hit a sort button which will sort the numbers on the screen.
After that, they are asked to choose one number to search for in the array. Ideally the search process will be visually represented so you can see how the binary search function divides and conquers the list of the numbers.
The program currently sorts an array then displays the resultant sorted array in a HTML page with CSS used to create a chart. It is also capable of searching the array and finding the given value using binary search.