We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

CS301 - GDB#1 will be launched on January 29, 2018, closing date is January 30, 2018.

Dear Students!

Graded Discussion Board (GDB) will be launched on Monday, January 29, 2018 and it will close on Tuesday, January 30, 2018.

GDB Scenario: 

Suppose you are working as a developer in a software house. A task is given to you to build an application for a shopping mall to maintain the inventory of different products. Products are divided into different categories. The number of categories are fixed but products in each category can increase/decrease depend on introducing new products. When new product will arrive it will be added to its category, if product will already in any category then only its quantity will update.

GDB Questions:

From array, singly linked list and doubly linked list, which data structure you will prefer to use to build required application. Searching of product should be efficient and application should take minimum possible memory. Select data one or more structure(s) of your choice with solid reason to justify your selection.


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!

+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..

See Your Saved Posts Timeline

Views: 4615


+ http://bit.ly/vucodes (Vu Study Groups By Subject Codes Wise)

Replies to This Discussion

Proper or sahi gdb share kar plz cs301 

We can't use it. because it uses three pointers. Which makes the searches slow. It also uses more memory than singly linked list. 

We use doubly only when their is no limitation of memory. But in the given scenario, we have to choose the method that uses the lowest memory.

So, singly is the best answer.

but efficient searching is also a requirement. and we can do it quickly if we do it in both directions. only in one direction will maybe lead to a dead end.

Right but when we use doubly, our second requirement will not be fulfilled. Because while dealing with doubly we are not able to use minimum memory. We have to look for both the requirements

full and final solution click here below link



GDB No #1

M Faheem


Singly linked list date structure I all prefer to use to build required application. Searching of product should be efficient and application should take minimum possible memory. Because

  • It uses less memory per node (single pointer).
  • Complexity of insertion and deletion at a known position is O(n).
  • If we need to save memory and searching is not required, we use singly linked list.
  • If we know that an element is located towards the end section, e.g. ‘zebra’ still we need to begin from start and traverse the whole list.
  • It allows traversal only in one way.
  • A singly linked list is a linked list where the node contains some data and a pointer to the next node in the list.

Singly linked list can mostly be used for stacks

bro its to much take time for searching 

CS 301 full solution what we choose data structure as mentioned scenario 

click here below link


Bro. what's this... Please read the question carefully.

Linked lists have several advantages over arrays. Elements can be inserted into linked lists indefinitely, while an array will eventually either fill up or need to be resized, an expensive operation that may not even be possible if memory is fragmented. Similarly, an array from which many elements are removed may become wastefully empty or need to be made smaller.

On the other hand, arrays allow random access, while linked lists allow only sequential access to elements. Singly-linked lists, in fact, can only be traversed in one direction. This makes linked lists unsuitable for applications where it's useful to look up an element by its index quickly, such as heapsort. Sequential access on arrays is also faster than on linked lists on many machines due to locality of reference and data caches. Linked lists receive almost no benefit from the cache.

Another disadvantage of linked lists is the extra storage needed for references, which often makes them impractical for lists of small data items such as characters or boolean values. It can also be slow, and with a naïve allocator, wasteful, to allocate memory separately for each new element, a problem generally solved using memory pools.


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

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