Tag Archives: cs301

CS301 Data Structures Assignment 2 Solution Fall 2014

Problem Statement: Suppose in a Hospital, there are two physicians to deal with patients. Patients of all ages come for their check up. Physician ‘A’ is designated as physician of old patients while physician ‘B’ has to check other patients. Many patients come to the hospital at the same time. There are two queues of […]

CS301 Data Structures Assignment 1 Solution Fall 2014

Problem Statement: Suppose a company Oraflex organizes interviews for a vacant post. Assume that the interviews of the successful candidates after short listing has been started and interview marks are being assigned. You being software developer of the company are assigned a task to prepare candidates’ list that will store candidates’ information such as their […]

CS301 Data Structures Quiz 4 Solution Spring 2014

The main reason of using heap in priority queue is improve performance code is readable less code heap can’t be used in priority queues 2.We implement the heap by ____________  Threaded Tree AVL tree Complete binary tree Expression 3.A simple sorting algorithm like selection sort or bubble sort has a worst-case of         O(1) time because all […]

CS301 Data Structures GDB Solution Spring 2014

GDB Scenario: Consider V Mart shopping mall where lot of customers comes to shop different products and pay their bills on daily basis.  Quantities of products are changing regularly, incremented as they are stocked, searched and decremented (deleted) as they are sold. It is observed that insertion, deletion and search is in balanced form, as all modifications to the data need to be completed […]

CS301 Data Structures Assignment 4 Solution Spring 2014

Mr. Hamid and Mr. Nisar are working as Detective in an investigation unit of a sensitive institution. They are assigned a very important and complex case to solve. Being an IT professional, you are assigned to help them in anyway. Mr. Hamid has to go outstation in search of a clue. He has found some […]

CS301 Data Structures Assignment 1 Solution Spring 2014

Question: I am sending you a C++ program related to linked list along with your assignment file. In the given C++ program, I did not write some functions. Name of these functions are given below. 1)      main() 2)      List addNodes(int number) 3)      void split(int c, List list, List largeList, List smallList) 4)      void differenceList(List listA, List listB) Your assignment is to write […]

CS301 Data Structure GDB Solution Fall 2013

GDB Scenario: Let us consider that you are a developer in a company. Your company asks you to develop an application for a data GRID station. Data GRID station is situated in NIPS (National Institute of Physical Sciences). Purpose of application is to receive the data from data GRID station once in a week between 10 A.M […]

CS301 Data Structures Assignment 4 Solution Fall 2013

Question 1(a):                                                                                                                                    Marks 2 Find the pre-order traversal of AVL tree given in solution of assignment 3. Solution:  pre order:  40. 31.16 . 19 . 33 . 55 . 50. 52 . 68. 57 . 66. 77 Question 1(b):                                                                                                                                    Marks 8 Construct min heap from data traversed in question 1(a).  Solution: Question 2(a):                                                                                                                                    Marks 2 Find the post-order traversal of AVL tree […]

CS301 Data Structures Assignment 2 Solution Fall 2013

Suppose there is a large busy cosmetic store. In store, for billing, there are four counters with four tellers (who deal payment etc). A customer comes to the store and collects the things he/she wants to purchase and go to one of the counters to pay for purchase. If there are already people in front of counters, […]