+1(978)310-4246 credencewriters@gmail.com

CSE 3318 – Homework 2
Total: 100 points Topics: time complexity of loops, good information delivery, run code to see behavior.
Write all your answers in a pdf or docx called 3318_H2.pdf and submit it in Canvas.
Put your NAME and section at the top of the first page.
You can handwrite the answer on paper and scan the paper as pdf, but make sure your handwriting is neat
and can be read. If the scan is not legible, or did not capture all of your answers on a page, or it is missing a
page, you will NOT have a chance to resubmit after the deadline. DOWNLOAD it back from CANVAS and
CHECK that the SUBMITTED PDF is good.
You can write your answers on white paper, but they must match the required format (e.g. the tables and the
components for the time complexity of loops calculation).
You do not need to ‘fit’ your answer in the given spacing. You can use as much space as your need.
You can run the code from this homework on your machine. You can also run it on omega or the VM, but that
is optional, not mandatory. Do NOT run it on an online coding server (that provides and IDE) as that may not
produce the expected clock time.
Q1. (8 points)
a) (3pts) What is wrong in the statement (something is wrong with its time complexity):
“Function void helper(int X, double T); has time complexity O(N)”
b) (3pts) Given the loop: for(k = 1; k
Purchase answer to see full

error: Content is protected !!