Order Number 45471455714
Type of Paper
Essay Writer Classification Level
Undergraduate
Style of Writing
MLA/APA/CHICAGO/
Sources and References 5
Number of Pages
4
Paper Instructions
Sarhad University, Peshawar Department:CSIT Program:BS (CS/IT), MCS
Course & Course Code:Design &Analysis of Algos.(CS241) *Student Name:
*Registration #
*Student Email:
Examination: Final Term Spring 2020 Total Marks: 50 (50% Weightage)
Instructor: Dr. Muhammad Asif Khan
IMPORTANT INSTRUCTIONS FOR THE STUDENTS:
Answer All Questions in the same Question Paper under each question/section subsequently.Before uploading, save thesame file in this format MID EXAM_DEPARTMENT_COURSE_Student Name_Reg#.docx
Upload it at your SUIT PORTAL before the deadline. Answer Sheet sent through EMAIL will not be accepted.The total size of this file should not exceed 1MB at the time of uploading it at portal so don’t insert images. Just type the answers under each question, avoid inserting images and follow the instructions at SUIT Portal.
And do remember that “understating the question is part of the examination”and “Plagiarism will be awarded minimum grades”.
Attempt All 6 Questions. Marks are mentioned against each question.
Time Start: 11:00 am (Thursday, October 8, 2020)
Time End:11:00 am (Friday, October 9, 2020)
- Suppose you are given an array A of n elements. Your task is to sort n numbers stored in array A by first finding the smallest element of A and exchanging it with the element in A[1]. Then find the second smallest element of A, and exchange it with A[2]. Continue in this manner for the first n-1 elements of A. Write pseudocode for this algorithm and write the name of this sorting algorithm. What loop invariant does this algorithm maintain? Why does it need to run for only the first n –1elements, rather than for all n elements? Give the best-case and worst-case running times of selection sort. [8]
- Suppose a linked list of 20 nodes. The middle node has a data –250. Write the pseudocode to replace the middle node of the linked list with a new node and new data. Assume that the list’s head pointer is called head_ptrand the data for the new node is called entry. [8]
- Traverse each of the following two graphs using the BFS and DFS algorithm. [8]
(a) (b)
- Represent the following graph using Linked List and write its Adjacency matrix. [8]
- Give asymptotic upper and lower bounds for T(n) in each of the following recurrences. Assume that T(n) is constant for n ≤ 2. Make your bounds as tight as possible, and justify your answers. [8]
- Draw a Binary Tree from the following array data and sort the resulting tree using Heap sort algorithm. [10]
Index 1 2 3 4 5 6 7 8 9 10 11 12 13 Data 56 74 35 24 65 85 47 18 52 18 42 36 72
Distinguished (100%)
Proficient (85%)
Basic (70%)
Below Expectations (50%)
Non-Performance (0%)
Thesis Statement Raises the strongest objection to the thesis presented in the assignment. The objection is strongly grounded in research and logical reasoning. Raises a plausible objection to the thesis presented in the assignment. The objection is mostly grounded in research and logical reasoning.
Raises an objection to the thesis presented in the assignment. The objection is somewhat grounded in research and logical reasoning. Attempts to raise an objection to the thesis presented in the assignment. The objection is minimally grounded in research and logical reasoning.
The objection to the thesis is either nonexistent or lacks the components described in the assignment instructions. Counter Argument Provides a strong, thorough rebuttal to the objection. The rebuttal effectively demonstrates that the thesis can withstand the objection and applies the principles of charity and accuracy.
Provides a rebuttal to the objection. The rebuttal mostly demonstrates that the thesis can withstand the objection and mostly applies the principles of charity and accuracy.
Provides a limited rebuttal to the objection. The rebuttal somewhat demonstrates that the thesis can withstand the objection and somewhat applies the principles of charity and accuracy.
Attempts to provide a rebuttal to the objection; however, the rebuttal minimally demonstrates that the thesis can withstand the objection and does not apply the principles of charity and accuracy.
The rebuttal is either nonexistent or lacks the components described in the assignment instructions. Conclusion Provides clear and concise closing remarks that comprehensively summarize the essay. The remarks consider the broader controversy and/or further research that could offer additional insight into the moral solution of the business problem.
Provides closing remarks that summarize the essay. The remarks mostly consider the broader controversy and/or further research that could offer additional insight into the moral solution of the business problem. The closing remarks are somewhat unclear.
Provides closing remarks that minimally summarizes the essay. The remarks minimally consider the broader controversy and/or further research that could offer additional insight into the moral solution of the business problems. The closing remarks are unclear and/or vague.
Attempts to provide closing remarks that summarize the essay; however, the remarks do not consider the broader controversy and/or further research that could offer additional insight into the moral solution of the business problem. The closing remarks are unclear and vague. The closing remarks are either nonexistent or lack the components described in the assignment instructions.
Written Communication: Context of and Purpose for Writing
Demonstrates methodical application of organization and presentation of content. The purpose of the writing is evident and easy to understand. Summaries, quotes, and/or paraphrases fit naturally into the sentences and paragraphs. Paper flows smoothly.
Demonstrates sufficient application of organization and presentation of content. The purpose of the writing is, for the most part, clear and easy to understand. There are some problems with the blending of summaries, paraphrases, and quotes. Paper flows somewhat smoothly. Demonstrates a limited understanding of organization and presentation of content in written work. The purpose of the writing is somewhat evident but may not be integrated throughout the assignment. There are many problems with the blending of summaries, paraphrases, and quotes. Paper does not flow smoothly in all sections.
Organization and presentation of content are extremely limited. The purpose of the writing is unclear. There is little or no blending of summaries, paraphrases, and quotes. Paper does not flow smoothly when read.
The assignment is either nonexistent or lacks the components described in the instructions.
Written Communication: Control of Syntax and Mechanics
– Displays meticulous comprehension and organization of syntax and mechanics, such as spelling and grammar. Written work contains no errors and is very easy to understand.
Displays comprehension and organization of syntax and mechanics, such as spelling and grammar. Written work contains only a few minor errors and is mostly easy to understand Displays basic comprehension of syntax and mechanics, such as spelling and grammar. Written work contains a few errors which may slightly distract the reader.
Fails to display basic comprehension of syntax or mechanics, such as spelling and grammar. Written work contains major errors which distract the reader.
The assignment is either nonexistent or lacks the components described in the instructions.
Written Communication: Required Formatting
Accurately uses required formatting consistently throughout the paper, title page, and reference page.
Exhibits required formatting throughout the paper. However, layout contains a few minor errors. Exhibits limited knowledge of required formatting throughout the paper. However, layout does not meet all requirements.
Fails to exhibit basic knowledge of required formatting. There are frequent errors, making the layout difficult to distinguish as required style.
The assignment is either nonexistent or lacks the components described in the instructions.
Written Communication: Word Requirement
The length of the paper is equivalent to the required number of words. The length of the paper is nearly equivalent to the required number of words.
The length of the paper is equivalent to at least three quarters of the required number of words. The length of the paper is equivalent to at least one half of the required number of words.
The assignment is either nonexistent or lacks the components described in the instructions.
Written Communication: Resource Requirement Uses more than the required number of scholarly sources, providing compelling evidence to support ideas. All sources on the reference page are used and cited correctly within the body of the assignment.
Uses the required number of scholarly sources to support ideas. All sources on the reference page are used and cited correctly within the body of the assignment.
Uses less than the required number of sources to support ideas. Some sources may not be scholarly. Most sources on the reference page are used within the body of the assignment. Citations may not be formatted correctly. Uses an inadequate number of sources that provide little or no support for ideas. Sources used may not be scholarly. Most sources on the reference page are not used within the body of the assignment. Citations are not formatted correctly.
The assignment is either nonexistent or lacks the components described in the instructions.