Each Exam-Quiz will be available for 48 hours and will have a duration of 60 minutes (must be completed within 60 minutes from the time it was opened).

Each ExamQuiz will be announced at least 1 week in advance.

One lowest grade from the ExamQuizzes grades will be dropped.

- Allowed during any ExamQuiz: pen, pencil, eraser and ONE page of WHITE paper. MAKE SURE YOU SHOW THE PAPER AND BOTH SIDES OF IT TO THE CAMERA when you take the video of your environment.
- No calculator allowed. If a quiz is allowed a calculator, that will be enabled in the quiz.
- Take the practice test to check your system is working with LockDown Browser and Respondus Monitor. Do this 2 or more days before the first ExamQuiz.
- Start the quiz no later than 2 hours before the due date (or the availability date). This is to give you time to complete the quiz and deal with possible technical issues.
- You should have your mic on during the exam. To prove that say a few words at the begining of the exam.
- When taking the video of the room, you must show all the space around you and your work space, including behind your computer and under your desk.
- If you are taking an ExamQuiz with LockDown Browser and and thus you cannot contact the instructor, and you have a question, or a doubt or you make an assumption about a problem, put a comment on a piece of paper and hold it up in front of the camera during the quiz, and email, or send a chat to the instructor, after you finish the quiz. In your message include the time when this happened (not the clock time, but at what minute out of the 60 minutes of the quiz you are - LockDown Browser shows the remaining time. You can use that). Write large fonts and hold the paper for a bit to help get a clear image. Use also your voice and say it outloud.
- If you can interpret a question in 2 ways and you cannot contact the instructor (because of Lockdown Browser), or do not get and answer in time,
**give the answer for both versions**. If you interpret the question the "wrong" way (not as it was intended), and only answer that version you will not get the points for it. But if you provide the answer to both versions, I can see your other answer as well and give credit if it is correct. If this situation happend for a free answer question, write it in the quiz answer. If it happens for an auto-graded question that allows only one answer, give the most likely answer in the exam, and write the other one on a sheet of paper and show to the camera (see more details about it below). - NOTE that FOR EVERY ALGORITHM that is part of a quiz, TIME COMPLEXITY AND SPACE COMPLEXITY ARE ALWAYS REQUIRED. They are part of knowing that algorithm.

- A cheat sheet with formulas will be provided in Canvas within the test. A practice quiz that uses LockDown Browser and Camera will be ready in Canvas.
- Notation conventions for answers in online quizzes - make sure you check this. 1-2 points will be lost for every answer if these conventions are blatantly disregarded. You do not need to stress about this formatting. It will be ok if you mainly follow it. I will also include this document with the quiz for your reference.
- Practice problems:
- Topics:
- time complexity of loops: Theta, dominant term(s), best case/worst case/average case where applicable.
- execution of for loops: how the 3 control instructions (init; condition; update) of a for loop execute (e.g. the init is excuted just once but the update is executed N times).
- Growth of functions and summations
- Θ, O, Ω, o,ω,
- order functions by their growth,
- e.g. know that if f(n) =Θg(n))=> f(n) = O(g(n)), but not viceversa

- Practice problems:
- insertion sort, indirect sorting, binary search ( Solution) - NOTE that selection sort is mentioned in some problems, but it is NOT covered this semester.
- count sort, radix sort, bucket sort practice, (Solution )
- Linked Lists problems for Quiz 2 .

(The problems from this document, Linked Lists, do not fit the pattern for the main problem set so they will not be part of the quiz, but they are great problems as well.)

- Topics:
- Insertion sort, indirect sorting - stable/not stable (be able to give counter example if not stable), write code (what was covered in class), data after each iteration of the outter loop, usage (when would you choose one over the other), time and space complexity, data moves.

Not included (not tested in the quiz): proving that an algorithm is correct; selection sort. - Binary search
- Count sort, radix sort, bucket sort
- Linked lists
- For any of the above algorithms must be able to:
- write code
- give time and space complexity (inlcuding the code you write)
- sorting and binary search - be able to show the data after each iteration of the [outter/inner] loop without seeing the code.

- Insertion sort, indirect sorting - stable/not stable (be able to give counter example if not stable), write code (what was covered in class), data after each iteration of the outter loop, usage (when would you choose one over the other), time and space complexity, data moves.

- Topics:
- stacks (concept, list-based, array-based, code for array-based),
- queues (concept, list-based, array-based),
- time complexity to grow an array using +const versus *const
- Heaps all concepts and code from slides pages 1-42. On Heapsort know that: it has time complexity O(NlgN), it is not stable and not adaptive, works in place (space complexity O(1)) and works by using a maxHeap: repeatedly removes the last element and places it at the end. You will not be asked to show how an array changes, or do any simulation. Just to know the properties and the general concept.
- Time and space complexity for all topics.

- Code:
- Code from slides for array implementation for stacks: newStack(), push(), pop() .
- Code for the Heap methods
**from slides (for maxHeap of int), not from hw4 (for minHeap of linked lists)**: buildMaxHeap(), swimUp(), idxOfMaxValue(), sinkDown() (you can call idxOfMaxValue() in sinkDdown() without providing code for it).

- Stacks, queues (Solution) - in the stack array implementation,
`top`is the index AFTER the last item (as done in class and in the slides). - Heaps (Solution)

- The quiz itself will provide a basic calculator (the one from LockDown Browser).
- If a problem requires and ASCII table, it will be provided with the problem. You should not have anything but the 1 sheet of white paper.
- Topics:
- Hash Tables
- binary trees,
- Binary Search Trees.
- 2-3-4 trees (see video in Canvas)
- Time and space complexity for all topics.

- Code
- tree problems 1-4 from homework 4.
- Code from slides:
- search and insert in BST,
- count nodes, compute height,
- DFS (depth first serach) traversals
- BFS (breadth first search) traversal: level-order traversal. Assume you can use a Queue object as done in code from slides. The print tree-related functions (show() and printnode() ) are not part of the exam.

- Practice:

- Topics: Greedy, DP
- Gredy, DP practice ( Solution)

- opens Thurs, May 05 at 11am and closes (with no late submission allowed) on Tues, May 10, 1:30pm. NOTE THE DUE DATE (it is NOT midninght). This time frame is chosen to overlap with the Final Exam times from the Official UTA Final Exam Schedule. ExamQuiz6 is not cumulative, like a final exam. It is like any other of the ExamQuizzes.
- The Master Theorem (from the class cheat sheet) will be given/provided in the exam with the exam. (Except for the Master Theorem, no other formulas will be provided).
- Topics
- Quicksort
- Mergesort - algorithm, simulation of it on an array of numbers, time and space complexity
- Master Theorem
- ?? Tree method for solving recursions??
- Graphs and all the Graph-related topics we covered: representation (and space requirement for each representation), BFS, DFS, edges (tree, backward,
~~CF~~), detect if a directed graph is acyclic or not, topological sorting, Strongly Connected Components, Minimum Spanning Trees, Shortest Path (Shortest Path Spanning Tree, All-pairs shortest paths). Time and space complexity and application of each of these algorithms.

- Practice problems:
- Graphs practice ( Solution)
- Sorting practice(Solution) - only problem MS1 (the mergesort problem)
- Recurrences ( Solution ) - The tree method is NOT part of the exam. Practice for the exam: Problems P1 (only with Master theorem, not with the tree method), P6, P7a (not required: b-e), P8, P9