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
How to Split Strings with Regex in Managed C++ Applications?
Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.
How can I Draw an ellipse in 3d space and color it by using graph3d?
Code for Two Classes for Doing Gzip in Memory?
Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.
i don't know about working of nested for loop can any one help me
develop a program to calculate and print body mass index for 200 employees
Code for Method of Handling Factorials of Any Size?
how to write a program that opens a file and display in reverse order?
3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...
Write a simple encryption program using string function which apply the substitution method.
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++
Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file