1. Consider the following algorithm:
for ( i = 1 ; i <= 1 . 5 n ; i++)
cout << i ;
for ( i = n ; i >= 1 ; i - - )
cout << i ;
(a) What is the output when n = 2, n = 4, and n = 6?
(b) What is the time complexity T(n)? You may assume that the input n is divisible by 2.
No Answer is Posted For this Question
Be the First to Post Answer
Define Routing Algorithm?
What is meant by a * search algorithm?
What is Na?ve Bayes Algorithm?
Which search algorithm will use a limited amount of memory in online search?
How does deep learning contrast with other machine learning algorithms?
Explain the concept behind dead lock avoidance, banker's algorithm.
0 Answers HPCL, Hughes Systique Corporation,
Which is the most straight forward approach for planning algorithm?
Which is the most straight forward approach for planning algorithms?
Consider the following algorithm: for ( i = 2 ; i <= n ; i++) { for ( j = 0 ; j <= n) { cout << i << j ; j = j + floor(n/4) ; } } (a) What is the output when n = 4 (b) What is the time complexity T(n). You may assume that n is divisible 4.
What are the disadvantages of breadth-first search algorithm?
What is local search algorithms?
Tell briefly about the Banker's algorithm and what is it used for?