Algorithm in O(2n)
Presently we can solve in our hypothetical machine problem
instances of size 100 in 1 minute using algorithm A, which
is a O(2n). We would like to solve instances of size 200 in
1 minute using algorithm A on a new machine.
What is the speed of the new machine should be?
Answers were Sorted based on User's Feedback
How can I Draw an ellipse in 3d space and color it by using graph3d?
Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?
i don't know about working of nested for loop can any one help me
#include<iostream.h> //main() //{ class A { friend class B; public: void read(); }; class B { public : int a,b; }; void A::read() { cout<<"welcome"; } main() { A x; B y; y.read(); } In the above program......, as B is a friend of A B can have access to all members,i cant access y.read . could you please tell me the reason and what would i code to execute this program?
can we declare an object of a class in another class?(assume both class as public classes)
how to write a program that opens a file and display in reverse order?
i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.
1. Write a program that performs the following. The user inputs a number and then enters a series of numbers from 1 to that number. Your program should determine which number (or numbers) is missing or duplicated in the series, if any. For example, if the user entered 5 as the initial number and then entered the following sequences, the results should be as shown. Input Sequence Output ---------------------- --------------- 1 2 3 4 5 Nothing bad However, if 7 were the high number, the user would see the results on the right for the following number entries: Input Sequence Output ---------------------- --------------- 1 3 2 4 5 Missing 6 Missing 7 And if 10 were the high number and the user entered the numbers shown on the left, note the list of missing and duplicate numbers: Input Sequence Output ---------------------- --------------- 1 2 4 7 4 4 5 10 8 2 6 Duplicate 2 ( 2 times) Missing 3 Duplicate 4 ( 3 times ) Missing 9
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
0 Answers Jomo Kenyatta University,
using friend function find the maximum number from given two numbers from two different classes.write all necessary functions and constructor for the classes.
write a program in c++ to scramble a bmp image file using a scramble key 0x7c and an XOR logic. print out the original image, the scrambled image and the program. Note: the first 24bytes of a bmp file contain the header information of the file.
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.