Using your JSFiddle account and Javascript you will create a program that will i
ID: 672420 • Letter: U
Question
Using your JSFiddle account and Javascript you will create a program that will instantiate an integer array of size 1000. Fill each array element with a random integer between 1 and 100. You will need to research the random function to do this.
You will write a function with 2 arguments. The name of the function will be SearchArray. Argument 1 is the array, argument 2 is the value you are searching for within the array. Each time the program compares 2 numbers you must count it as an operation. Output the total number of operations. State using Big O Notation your time complexity and be prepared to justify your answer.
Please provide screenshots of code with output and mention frameworks and extentions used. Thank you!
Explanation / Answer
<p id="demo"></p>
<script>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.