Login Register






Data Structures : An Introduction filter_list
Author
Message
RE: Data Structures : An Introduction #6
(05-14-2013, 07:31 PM)Deque Wrote: I thought you have not much time at the moment and now I see another awesome paper.

As always I have some comments for you.

Quote:What is Data Structures ?

Should be: What are Data Structures?

Quote:These data can be more than one variable. They also contain algorithms to process those stored data.

Data is not plural.

Quote:Homogeneous and Heterogeneous Data Structures
[...]
Linear and Non-Linear Data Structures

I would increase the size a bit of these titles.

Quote:The same is true if you want to insert a new node at a specific location. It is not difficult to see the problem of inefficiency.

It is much more inefficient to insert a new element in the middle of an dynamic array than into a linked list.

Imagine you have this dynamic array:

8 9 5 2 9 6

Now you want to insert element 3 between the second and the third element like so:

8 9 3 5 2 9 6

That means you have to copy at worst case (new element inserted at the beginning) the whole array. In this case the numbers I marked yellow are copied.

If you have a linked list this is a much less costly operation, because you just change some pointers. Of course you might still have to do a search operation to get to the element's positition. But searching is a different operation than inserting and shouldn't be mixed when talking about the efficiency of one. It might as well be that your algorithm doesn't need to search the element's position before insertion, because it operates in a way that it has the pointer to the position already at hand (i.e. inserts only at the beginning or inserts a lot of elements at the same position)


Quote:Most standard libraries, such the Java API, and the .NET framework, provide a Queue class that provides these two basic interfaces for adding and removing items from a queue.

That is also true for the other data types listed and nothing special for the queue.

Also: A queue is an abstract data type and it can be implemented with a linked list. Maybe that should be mentioned somewhere.

Same for the stack, which is abstract too.

Quote:There are many applications of Data structure and its upto you that how will you use them to create an application.

Every application uses data structures.

Thank you for the feedback. I love that you took my request seriously and you are being strict in every single mistake. Thank you for that. I love it.

I have updated the thread.

Well tomorrow I have Xilinx lab and Computer Architecture and I am pretty good in that. So I took out some time for my SweetHeart that is HC :wink:

EDIT: I must not say pretty good as there is always a scope for learning something new. But I have my concepts clear.

Thank you,
Sincerely,
Psycho_Coder
[Image: OilyCostlyEwe.gif]

Reply





Messages In This Thread