Time Complexity

by Ron Eaglin

HTML

Enter Array Size:
<input type="textbox" id="location" value="100" />
<p id="demo"></p>
<button type="button" value="Create Array" onclick="document.getElementById('demo').innerHTML= getRndInteger(0,100)"> Create Array </button>

<br>
<br>

<br/> Enter Location:
<input type="textbox" id="index" />
<br>
<br>Enter Value to Insert:
<input type="textbox" id="value" />
<input type="button" value="Insert into Array" onclick="insertIntoArray();" />
<br>
<br/>
<input type="textbox" id="search" />
<input type="button" value="Search Array" onclick="displaySearch();" />
<div id="output"></div>
<div id="count"></div>

JavaScript

function getRndInteger(min, max) {
  return Math.floor(Math.random() * (max - min)) + min;
}