Cs302 2nd Assignment Solution 2015 Calendar

CS 302 Data Structures

Department of Computer Science & Engineering

UNR, Spring 2018

Course Information - Description - Objective - Prerequisites - Textbooks - Topics - Organization - Grading - ABET Criteria - Resources - Schedule - Announcements

Course Information

Class hours Monday & Wednesday, 2:30PM - 3:45PM, WRB 2003
Instructor M. Abdullah Canbaz
E-mail mcanbaz [at] unr {dot} edu
Web page http://www.cse.unr.edu/~mcanbaz
Office SEM 211 (Scrugham Engineering-Mines)
Office hours Monday & Wednesday, 12:00 pm - 1:00 pm or by appointment
Assistants Shehryar Khattak,
Email:shehryar [at] nevada {dot} unr {dot} edu,
Office Hours: Friday, 11:00 am - 1:00 pm at ARF 116

Athanasia Katsila,
Email:akatsila [at] nevada {dot} unr {dot} edu,
Office Hours: Thursdays, 10:30 am - 12:30 pm at SEM 211

Catalog Description

Data structures and algorithms fundamental to computer science; abstract data-type concepts; measures of program running time and time complexity; algorithm analysis and design techniques.


The purpose of this course is to introduce you to data structures, an issue central to the art of computer programming. At the end of the course you will be equipped with the tools of data organization to enable you to write simple, clear, and efficient programs. The course will be structured around a comprehensive set of computer assignments to enable you to get hands on experience. Our programming language of choice will be C++.

You may look at earlier courses from Fall 2012, Spring 2013, Spring 2015 and Fall 2016.


  • Prerequisite : C or above in CS 202
  • A good working knowledge of C++ programming up through recursion, dynamic memory and basic data structures such as stacks, queues, and linked lists.


Required Recommended
  • Gayle L McDowell Cracking the Code Interview, CareerCup, 6th edition
  • Setfan Brandle, Jonathan Geisler, James Roberge, David Whittington"C++ Data Structures: A Laboratory Course", Jones and Bartlett, 3rd edition
  • Clifford A. Shaffer Data Structures and Algorithm Analysis, Dover Publications, 3rd edition.
  • Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein, "Introduction To Algorithms", The MIT Press; 3rd edition.
  • Mark Allen Weiss, "Data Structures and Algorithm Analysis in C++ ", Prentice Hall, 3rd edition
  • W. Ford and W. Topp, "Data Structures with C++", Prentice Hall, 2nd edition
  • R. Kruse and A. Ryba "Data Structures and Program Design in C++ ", Prentice Hall
  • M. Main and W. Savitch "Data Structures and Other Objects Using C++.", Prentice Hall, 4th edition
  • Nell Dale, "C++ Plus Data Structures", Jones & Bartlett Learning; 5th edition.

Topics (Tentative)

This is a tentative list of topics, subject to modification and reorganization.
  • Data Abstraction
  • Recursion
  • Array- and Link-Based Implementations
  • Recursion as a Problem-Solving Technique
  • Stacks
  • Lists
  • Algorithm Efficiency
  • Sorting (Selection sort, Bubble sort, Insertion sort, Merge sort, Quick sort, Radix sort, Counting sort, Bucket sort)
  • Queues and Priority Queues
  • Trees (Binary Search Tree, Interval Tree, MDS Tree)
  • Heaps (Heap ADT and Heap Sort)
  • Dictionaries (Dictionary ADT, Hashing)
  • Balanced Search Trees (2-3 Trees, 2-3-4 Trees, Red-Black Trees, AVL Trees)
  • Graph (Breadth-first search, Depth-first search, Minimum Spanning Tree, Bellman-Ford shortest path, Dijkstra shortest path, Circuits)
  • Processing Data in External Storage


  • Except this web page, all course materials will be posted at the WebCampus.
  • Presentation slides will be available on the class web page. I will try to put them up before each class meeting but no guarantees on that.
  • Students are expected to attend, and be on time, for every class. This demonstrates professionalism and consideration for your fellow students and your Instructor. While the course does not have an attendance policy, students who miss class and/or are late for class may experience an impact on their grade by missing classroom activities and/or quizzes.
  • Students are expected to turn in all assigned materials in a timely manner.
  • Students are expected to demonstrate professionalism and courtesy by either silencing or turning off all cell phones and/or other alarm or audible indicator devices.
  • The Instructors reserve the right to add to, and/or modify any of the above policies as needed to maintain an appropriate and effective educational atmosphere in the classroom and the laboratory. In the case that this occurs, all students will be notified in advance of implementation of the new and/or modified policy.
  • UNR Athletics: If you are involved with any university-sponsored athletic activities that will have an impact on your attendance, please provide your Instructor with a letter from your coach and/or the UNR Athletic Department as soon as possible, but no later than the end of the second week of classes. This should include the official schedule of your activities which will impact your attendance throughout the semester.
  • Assignments, Examinations and Grading: All formal homework assignments (including exercises and projects) and all exams (quizzes, exams, and the final) are to be treated as individual and not collective efforts, unless specified otherwise. A severe penalty will be given to any assignment which indicates collusion or cheating. The usual penalty for cheating on project or an exam is failure in the course.
  • Assignments and exams must be prepared strictly individually. You are welcome to discuss the problems or solution strategies with your class mates but the resulting work should be your own. Copying from each other or from other sources is considered as cheating.
  • Homework Assignments: Homework assignments will be distributed at the instructor or TAs discretion. These consist of practice questions which are intended to assist the student in mastering the course content. Some of these assignments will be collected and graded (Canvas) and count towards extra credit.
  • Quizzes: There will be several announced and unannounced quizzes in lecture and online (Canvas).
  • There will be 12 online quizzes given almost every week. The lowest graded one will not affect your overall grade. Questions in these quizzes will be designed to give you an opportunity to test and affirm your knowledge for the week's material.
  • Exams: There will be one mid-term examination and one final examination. All exams will be closed books, closed notes. Permissions to take exams on other dates than scheduled will not be given, except for extreme medical or family emergencies with respective documentation. Please ensure that the instructor and TAs are notified at the earliest possible convenience. All exams will take place in the regular classroom.
  • The material covered in the exams will be drawn from the lectures, quizzes, and homework. The exams will be closed books and closed notes but a single page cheat sheet (double side letter size) is allowed. No calculators (unless otherwise stated) and no other computing devices should be used during the exam.
  • Programming Assignments/Labs: The Programming Assignments/Labs require the solutions to problems using the computer. We will be using the workstations in the College of Engineering Computing Center (SEM 231). You will be instructed how to submit your projects for grading. Typically, you will be asked to submit an electronic version of your code, and test runs, along with a folder with an appropriate write-up for your program.
  • There will be 7 (+1 optional) programming assignments. In the lectures, you will be introduced to data structures at an abstract level. In the assignments, you will write code to implement and use these data structures. Assignments will require turning in C/C++ code that compiles and runs properly, and a report documenting the code. Some of the programming assignments will be done in groups of two. When working with a partner, both team members are expected to fully understand the structure of the code and the implemented algorithms. Discussion of the programming assignments is allowed and encouraged. However, students are expected to do their own work. Assignments which are too similar or replicated from the Internet will receive a zero.
  • Every assignment must be completed, working, and turned in. There will be 3 points penalty for each missing programming assignment or submissions with grades less than 5 points (without late penalty). Late assignments will be penalized by 20% per day, except holidays.
  • Programming assignment/lab completion is essential for learning in this course. It is suggested that you take advantage of TA office hours as substantive effort is being allocated to be successful with respect to the programming assignments. Each programming assignment will be graded by a TA who will also be responsible for answering questions regarding that assignment.
  • Don't get behind in the programming assignments. Probably the main reason for students doing poorly in this course is getting behind in the assignments and never recovering. Design and implement in a top-down, modular fashion. Get something working that has the skeleton structure of what you need and then add features to it. Each time you add a feature, test it and make sure everything is still working. It can be tough to debug big programs if all you know is that the output is wrong and you are not sure any individual module is working.
  • Online forums are set up in WebCampus to exchange ideas and provide tips. Active users will be given bonus points at the end of the semester.
  • Academic Success Services: Your student fees cover usage of the University Math Center (775) 784-4433, University Tutoring Center (775) 784-6801, and University University Writing Center (775) 784-6030. These centers support your classroom learning; it is your responsibility to take advantage of their services. Keep in mind that seeking help outside of class is the sign of a responsible and successful student.
  • Disability Statement: Any student with a disability needing academic adjustments or accommodations is requested to speak with the Disability Resource Center (Pennington Student Achievement Center, Suite 230) as soon as possible to arrange for appropriate accommodations.
  • Class Recording: Surreptitious or covert video-taping of class or unauthorized audio recording of class is prohibited by law and by Board of Regents policy. This class may be videotaped or audio recorded only with the written permission of the instructor. In order to accommodate students with disabilities, some students may be given permission to record class lectures and discussions. Therefore, students should understand that their comments during class may be recorded.
  • Academic Dishonesty: Cheating, plagiarism or otherwise obtaining grades under false pretenses constitute academic dishonesty according to the code of this university. Academic dishonesty will not be tolerated and penalties can include canceling a student's enrollment without a grade, giving an F for the course or for the assignment. For more details, see the University of Nevada, Reno General Catalog.

Grading (Tentative)

Both grading policy and scale are subject to change. Failure in either the assignments or the tests will result in failure in the course.

Grading Policy

    42 - Programming Assignments (7 of 8)
    10 - Quizzes (10 of 12)
    22 - Midterm Exam
    26 - Final Exam

Grading Scale (Tentative)

    A  : [92 - 100]
    A- : [88 - 92)
    B+ : [84 - 88)
    B  : [80 - 84)
    B- : [76 - 80)
    C+ : [72 - 76)
    C  : [68 - 72)
    C- : [64 - 68)
    D+ : [60 - 64)
    D  : [56 - 60)
    D- : [52 - 56)
    F  : [0 - 52) or caught cheating

Important Note: You will have one week to appeal for your grades after the graded assignments/tests are returned. So, please keep this in mind if you think that there is a problem/issue with the grading of your work.

ABET Criteria

The course outcomes are skills and abilities students should have acquired by the end of the course. These outcomes are defined in terms of the ABET Accreditation Criterion 3 Program Outcomes which are relevant to this course.

Our graduates will have achieved:

  • (3) an ability to design, implement, and evaluate a computer-based system, process, component, or program to meet desired needs, within realistic constraints specific to the field.
  • (4) an ability to function effectively on multi-disciplinary teams.
  • (7) an ability to communicate effectively with a range of audiences.
  • (9) a recognition of the need for, and an ability to engage in continuing professional development and life-long learning.
  • (10) a knowledge of contemporary issues.


Schedule (Tentative), Notes & Assignments

This is a tentative schedule including the exam dates. It is subject to readjustment depending on the time we actually spend in class covering the topics.

Permanent reading assignment: it is assumed that you are familiar with the contents of the slides of all past meetings.

Mon, Jan 22Lecture #1: Introduction  W 
Wed, Jan 24Lecture #2: C++ classesInt.1Quiz 1WC++ Tutorial
Mon, Jan 29Lecture #3:Doxygen Documentation, Data Abstraction WDoxygen Manual
Wed, Jan 31Lecture #4:RecursionCh.2  W 
Mon, Feb 5Lecture #5: Array-Based Implementation, Link-Based ImplementationCh.3,4 Assignment 1   
Wed, Feb 7Lecture #6: Recursion As Problem Solving TechniqueCh.5Quiz 2  Palindrome.cpp
Mon, Feb 12Lecture #9: StacksCh.6,7W 
Wed, Feb 14Lecture #10: Stacks ADTCh.6,7 Assignment 2 , Quiz 3  
Mon, Feb 19Presidents Day (no class)    
Wed, Feb 21Lecture #11: ListsCh.8,9 Quiz 4W 
Mon, Feb 26Lecture #12:Algorithm EfficiencyCh.10 W 
Wed, Feb 28Lecture #13:Sorting Algorithms (Selection sort, Insertion sort, Bubble sort)Ch.11 Quiz 5W 
Mon, Mar 5Lecture #14:Sorting Algorithms (Merge sort, Quick sort)Ch.11,7* Assignment 3   
Wed, Mar 7Lecture #15:Sorting Algorithms (Counting sort, Bucket sort, Radix sort)Ch.11, 8* Quiz 6   
Mon, Mar 12Lecture #16:Sorted Lists- Midterm reviewCh.12    
Wed, Mar 14Midterm Exam    
Mon, Mar 19Spring Break    
Wed, Mar 21Spring Break    
Mon, Mar 26Lecture #17:Queue and Priority Queue-ADTCh.13,14 Quiz 7   
Wed, Mar 28Lecture #18:TreesCh.15 Program 4  
Mon, April 2Lecture #19:Tree Implementations- Midterm reviewCh.16Quiz 8   
Wed, April 4Lecture #20:Tree Implementations-Heaps (Heap ADT)Ch.16,17    
Mon, April 9Lecture #21:Heaps (Heap Sort)-Dictionaries (ADT, Direct addressing)Ch.17,18 Quiz 9   
Wed, April 11Lecture #22:Dictionaries (Hashing)Ch.18 Program 5  
Mon, April 16Lecture #23:Balanced Search Trees (AVL Trees, 2-3 Trees)Ch.19 Quiz 10   
Wed, April 18Lecture #24:Balanced Search Trees (2-3-4 Trees, Red-Black Trees)Ch.19,14*    
Mon, April 23Lecture #25:Balanced Search Trees (Red-Black Trees)-GraphsCh.14*,20 Program 6  
Wed, April 25Lecture #26:Graphs (DFS, BFS, MST)Ch.20 Quiz 11   
Mon, May 2Lecture #27:Graphs (Bellman-Ford and Dijkstra shortest path)Ch.20,24*    
Wed, May 7Lecture #28:Processing Data in External StorageCh.21 Quiz 12 -Program 7  
Wed, May 16Final Exam @ 12:10 pm Optional Program 8 on May 16  

* "Introduction To Algorithms" textbook by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein.

Acknowledgements: Slides are modified from the original slides of the textbook by Carrano and Henry.


Announcements regarding the course will be posted on this web page and sent by e-mail to your UNR e-mail account. Please daily check your UNR e-mail.

The materials for this course are in part based upon the materials from a number of people/sources, including:

Course Information - Description - Objective - Prerequisites - Textbooks - Organization - Grading - ABET Criteria - Resources - Schedule - Announcements

Last updated on 21st January, 2018.
Lectures covered = Lecture No 17 to Lecture No 23
Assignment Tools = Paint, MS Word, WaveDrom Editor

Assignment DeadLine = 03/July/2017

CS302 Assignment Objectives:

To learn about different decoders and to solve real time problems by analyzing waveforms and determine output from that and verification of circuit using ABEL coding.

CS302 Assignment Instructions:

It should be clear that your assignment will not get any credit if:
  • The assignment is submitted after due date. 
  • The assignment is submitted via email. 
  • The assignment is copied from Internet or from any other student. 
  • The submitted assignment does not open or file is corrupt. 
  • It is in some other format than .doc/docx. 
Please Note: All types of plagiarism are strictly prohibited.

For any query about the assignment, contact at CS302@vu.edu.pk

Important Note:

You have to provide all processing steps in all questions otherwise, marks will be deducted. Hand drawn pictures of waveform and images of tables/equations will be marked as ZERO.

Question No. 1 (Part - a)

[Marks = 10]

A Seven Segment Decoder is used to decode the given BCD number to display it onto the Seven Segment Display. Block diagram of this process is given in ‘figure 2’. 

Figure 1
Figure 2

‘Figure 1’ contains BCD inputs which are applied at BCD to 7 Segment Decoder as a waveform. Your task is to draw wave forms for all segment i.e. a, b, c, d, e, f, g for their respective inputs and also mention the BCD numbers which will be displayed on the Seven Segment Display in sequence for each combination of given inputs.

Question No. 1 (Part - b)

[Marks = 10]

You have to write ABEL input file code for a BCD-to-Seven Segment Decoder as discussed in question 1 (a). Your ABEL module must have two sections (Declarations & Test vector using a set) where IC name is 74LS47 and pins 6, 2, 1 and 7 will be used for A3, A2, A1 and A0 respectively as an input.

CS302 Assignment  No 3 Solution Spring 2017

You can download Cs302 Assignment no 3 solution file from the link below:

Cs302 Assignment Solution Download Link:


Assignment Solution Sample Page Preview

CS302 Assignment  No 3 Solution Sample Page Preview 1

CS302 Assignment  No 3 Solution Sample Page Preview 2

CS302 Assignment  No 3 Solution Sample Page Preview 3

Assignment Solution Idea

CS302 Assignment  No 3 Solution idea Question no 1
CS302 Assignment  No 3 Solution idea Question no 2

Solution Idea = Solved by Syed Hasnat

If this was helpfull Please like us on Facebook, or Subscribe below. Thank You

One thought on “Cs302 2nd Assignment Solution 2015 Calendar

Leave a Reply

Your email address will not be published. Required fields are marked *