EXAM 2024 ACTUAL EXAM 2 VERSIONS (VERSION A
AND B) COMPLETE 500 QUESTIONS WITH DETAILED
VERIFIED ANSWERS /ALREADY GRADED A+
1.1.1.1. What will you typically need to implement yourself in the programming
assignments if you program in C++, Java or Python?
A. Reading input, writing output and the solution to the problem.
B. Just reading the input.
C. Just the solution of the problem.
D. Just writing the output. - ANSWER: C. Just the solution of the problem.
.
1.1.1.2. Your program in C, C++ or Java thinks that the product of numbers 50000
and 50000 is equal to -1794967296. What is the most probable reason?
A. Compiler error.
B. The problem statement is wrong.
C. The input data is incorrect.
D. Integer overflow. - ANSWER: D. Integer overflow.
1.1.1.3. Which tests should you perform before submitting a solution to the
programming assignment?
A. Just submit the program and see if it passes the assignment.
B. Test on the examples from the problem statement. Then make a few other small
tests, solve them manually and check that your program outputs the correct answer.
After all these tests passed, submit the solution.
C. Test on the examples from the problem statement. Then make a few other small
tests, solve them manually and check that your program outputs the correct answer.
Generate a big input and launch your program to check that it works fast enough
and doesn't consume too much memory. Test for corner cases: smallest allowed
values and largest allowed values of all input parameters, equal numbers in the
input, very long strings, etc. Then make a stress test. After all these tests passed,
submit the solution.
D. Just check that the answers for the exampl - ANSWER: C. Test on the examples
from the problem statement. Then make a few other small tests, solve them
manually and check that your program outputs the correct answer. Generate a big
input and launch your program to check that it works fast enough and doesn't
consume too much memory. Test for corner cases: smallest allowed values and
largest allowed values of all input parameters, equal numbers in the input, very long
strings, etc. Then make a stress test. After all these tests passed, submit the solution.
1.1.1.4. Where does the input data come from when you implement a stress test?
A. You download and use the tests we've prepared to check your solution to the
problem.
B. You generate valid input data as a part of the stress test implementation.
, C. You enter the input data manually. - ANSWER: B. You generate valid input data as
a part of the stress test implementation.
1.1.1.5. If you submit a solution of a programming assignment, but it does not pass
some of the tests, what feedback will you get from the system?
A. You will see the input data, the answer of your program, the correct answer, how
long did your program work and how much memory did it use for each of the tests.
B. You will only get the feedback that your program either passed or did not pass.
C. If it is one of the first few tests, you will see the input data, the answer of your
program and the correct answer. Otherwise, you will only see either that the answer
of your program is wrong or that your program is too slow or that your program uses
too much memory. - ANSWER: C. If it is one of the first few tests, you will see the
input data, the answer of your program and the correct answer. Otherwise, you will
only see either that the answer of your program is wrong or that your program is too
slow or that your program uses too much memory.
1.2.1.1. Is it true that (log5_n)2=2log5_n? - ANSWER: B. No
1.2.1.2. log2_n⋅log3_2=log3_n - ANSWER: A. Yes
1.2.1.3. n^(log2_n)=n - ANSWER: B. No
1.2.1.4. log3_2n=log3_2⋅log3_n - ANSWER: B. No
1.2.1.5. log10_n2=2.log10_n - ANSWER: A. Yes
1.2.1.6. n.log7_3=7.log3_n - ANSWER: B. No
1.2.2.1. Is it true that log_2n=O(n^2) - ANSWER: A. Yes
1.2.2.2. n.log2_n=O(n) - ANSWER: B. No
1.2.2.3. n^2=O(n^3) - ANSWER: A. Yes
1.2.2.4. n=O(sqrt(n)) - ANSWER: B. No
1.2.2.5. 5^(log2-n)=O(n^2) - ANSWER: B. No
1.2.2.6. n^5=O(2^(3.log2_n)) - ANSWER: B. No
1.2.2.7. 2^n=O(2^(n+1)) - ANSWER: A. Yes
1.2.3.1.
f_1(n)=n^3
f_2(n)=n^0.3
f_3(n)=n
f_4(n)=sqrt(n)