Sorting Algorithm?
an algorithm that puts a list into alphabetic or numeric order
What is the output?
a=3
b= 5
c=b
d=a
Display(d)
3
Name two of the sequential search examples
Linear search, Binary search
What is a Bubble Sort?
Repeatedly comparing two values together and switching them as needed, and going through lists over and over again until finished
Evaluate the following expression: (109 *4) mod 19.
18
Asynchronous?
that the request cannot be completed at the same time as it was made and may take an unpredictable amount of time
What is the output?
n= 4
Repeat n times
n=n+1
Display(n)
8
For searching an unordered list, which search algorithm is the better choice?
Linear Search
What is Merge Sort?
It “merges” multiple sets of 1 to sets of 2, to 4, to 8, and so on, with the lowest value at the bottom and the highest value at the top until there is just one pile left
Name some high-level programming languages.
Python, Java, C#, C++, Visual Basic, JavaScript
Low-level programming?
a programming language that provides little or no abstraction from a computer's instruction set architecture
What will be the output?
a= True
b= False
c= False
d= True
e = d OR c
f = b OR a
t= e AND f
Display (t)
True
What is binary search?
a search algorithm that repeatedly divides a sorted list to narrow in on the searched-for item
Makes different “buckets” or groups based on a value and all data with that value goes to their specific bucket.
What does HTML use for?
describing the structure, and format of Web pages.
Heuristic Algorithm?
an algorithm that finds an approximate solution for a hard problem; helpful for finding a solution in a reasonable amount of time
What is the output?
n=4
repeat 6 times
If n > 9
t=n
Else
n=n+1
Display (n)
10
When will Binary search be used?
It will be used for a sorted list.
Which is the fastest sorting method between Bubble Sort, Merge Sort, and Bucket sort?
Bucket sort
Who invented Java?
James Gosling
The Halting Problem?
The undecidable problem of determining whether a computer program will halt (produce an answer) at some point or loop forever on a given input
What will be in the list(n)?
listn= [1,2,3,4,5]
remove(listn,5)
append[listn,6]
insert[listn,3,7]
listn = [1,2,7,3,4,6]
Guess what search this pseudocode belongs to?
Binary search
Why is Bubble sort the slowest?
To sort an entire list, you must pass through the entire list over and over again until it is all in order
When was binary search invented?
1960