Give an example of an O (n) algorithm and O (n*n) algorithm such that the algorithm is slower.
Consider the following algorithm: j = 1 ; while ( j <= n/2) { i = 1 ; while ( i <= j ) { cout << j << i ; i++; } j++; } (a) What is the output when n = 6, n = 8, and n = 10? (b) What is the time complexity T(n)? You may assume that the input n is divisible by 2.
Which algorithm in ‘unification and lifting’ takes two sentences and returns a unifier?
Give an algorithm for the following problem. Given a list of n distinct positive integers, partition the list into two sublists, each of size n/2, such that the difference between the sums of the integers in the two sublists is minimized. You may assume that n is a multiple of 2.
what is software cycle?give a diagramatic representation
What is meant by a * search algorithm?
What is simulated annealing algorithm?
Name search algorithm technology?
Which language is used for artificial intelligence?
Tell briefly about the Banker's algorithm and what is it used for?
Why size of integer depends on the machine architecture then what the best sorting algorithm and why?
0 Answers HPCL, Hughes Systique Corporation,
Define Routing Algorithm?
Given a sorted array of n integers that has been rotated i(unknown) number of times, give a (log n) algorithm that finds an element in the array.