This is python questions
1.An algorithm to solve this computation problem must be written using a programming language.
a.True
b.False
2.O(N) is called __________ complexity.
a.Constant
b.Linear
c.Quadraic
d.Exponential
3.
A fast sorting algorithm is a sorting algorithm that has an average runtime complexity of __________ or better.
a.O(N2)
b.O(N1.5)
c.O(NlogN)
d.None of these
4.A(n)_________ describes a sequence of steps to solve a computational problem or perform a calculation.
a.permutation
b.statement
c,algorithm
d.formula
1)Answer:Option b
False
Because for any computational or general problem algorithm can be written even using natural language or flow charts
After that for implementation of algorithm we use programming language.
Further algorithm is translated into programming language accordingly
Algorithm is unambiguous
2) Answer: option b(linear)
0(N) is linear complexity
And rest of them are not correct because
0(1) is constant complexity
And it is not quadratic or exponential
So it is linear complexity
3) Answer :option c
That is O(NlogN)
Which is the average run time complexity of fast sorting algorithm
4) Answer:option c
Algorithm
An algorithm is that describes sequence of the steps to solve computational problem or perform calculations
Get Answers For Free
Most questions answered within 1 hours.