Pens/pencils and a math calculator along with this exampaper are only allowed on the table. No scratch paper; use the rear of an exam page that is blank and mark it properly. Do not detach pages of this exampaper. {\bf ALERT:} Mobile phones, mobile or not devices, including wearables connected to phones or to networks (e.g. iwatch) SHOULD NOT BE ON YOU or on the exam table. They must be powered down (equivalent to removing the battery) and put securely in a backpack or bag. The backpack/bag should be closed/zippered. Read the Syllabus clause on devices. This includes hearing aids or hearing attachments. (You should have requested permission for their use through the Dea n of Students.) FOOD/DRINKS are not allowed per NJIT regulations. Efficient} means an algorithm whose performance (space or time or both) cannot be improved upon asymptotically. Time efficient means asymptotic time efficiency cannot be improved upon. Space efficiency is to be interpreted likewise. Comparison efficient means the number of comparisons cannot be improved upon and thus constants are important for higher-order terms: thus $\Theta (n)$ is worse than $3n$, and $3n$ is worse than say $2n+o(n)$. Use T(.) for running time, S(.) for space resources, and C(.) for comparison counts with the choice of parameter(s) as needed. INCR = < 1, 2, ... , n-1, n >$ is the sorted sequence of the first n positive integers starting with 1. DECR = < n, n-1, ... , 2, 1 >$ is the reverse sorted sequence of the first n positive integers starting with n.