Min-Max
Write an algorithm that finds both the smallest and
largest numbers in a list of n numbers and with complexity
T(n) is at most about (1.5)n comparisons.
Answer Posted / harish
2(n-1)
| Is This Answer Correct ? | 27 Yes | 28 No |
Post New Answer View All Answers
1+1/2!+1/3!+...+1/n!
Code for Easily Using Hash Table?
write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20
Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.
what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }
Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).
how to diplay a external image of output on winxp by using c & c++,
write a program to perform generic sort in arrays?
develop a program to calculate and print body mass index for 200 employees
write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation
write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150
How can I Draw an ellipse in 3d space and color it by using graph3d?
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)