Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

"CS301 - Data Structures" Graded Discussion Board (GDB) {Aug 9, 2018 to Aug 10, 2018}

GDB Scenario:

 Suppose a company wants to develop an application to collect and store the temperature statistics of different countries. The city wise temperature details from all the countries are collected from different online spreadsheets. Some of these spreadsheets contain sorted data and others contain semi-sorted data (chunks of data are sorted).

The main requirement of the application is that it should be able to store and search for data quickly. It means if you want to store a country’s temperature stats in this application, it should be able to store it quickly and if you want to search for a specific city’s temperature, it should provide you with fastest possible search.


If you are hired by this company to develop this application and you are provided with two options of data structures to choose from:

-          AVL Tree

-          Heap

Which data structure you will prefer to use when

(i)                 Data is sorted

(ii)               Data is semi-sorted



Your answer should not exceed 2 – 3 lines of text for each option.

A concise, coherent and to the point answer is preferred over lengthy comment having irrelevant details.  Answers, posted on regular Lesson's MDB or sent through email will NOT be considered in any case.

Please note GDB does not have any grace day. We are giving about a full week to prepare your comments and 48 hours to just post them. GDB comments will not be accepted through email in any case.  

Best of Luck!


Views: 3480

Replies to This Discussion

avl for semi sorted and heap for sorted

mjy data structure ni aati h kia kron?

its easy. just need concentration... 

read handouts deeply... no need of video lectures.

Please Discuss here about this GDB.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

Discussed & be touched with this discussion. After discussion a perfect solution will come in a result at the end.



For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.


.•°How to Download past papers from study groups°•.


Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 


P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

past paper cs301 k kise k pas hy to send kr dy plzzzzzzz

If you want sorted elements, go with BST (AVL Tree). Heap is better at findMin/findMax ( O(1) ), while BST is good at all finds ( O(logN) )

i dont think its right

 imran khalid bro ap ki MGT201 hy?


GDB Solution is here

I will recommend AVLTree Data Structure for both conditions. AVL tree data structure is a powerful tool for organizing data objects. It is equally useful for organizing multiple
data objects like that of hierarchical relationships.
AVL Tree is a data structure which is used to manage the large amount of data at one place and access of data is much faster.
The good one example for tree is Database design.


Looking For Something? Search Below

Latest Activity

© 2022   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service