944,087 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 3126
  • C++ RSS
Jul 11th, 2006
0

Data Structures???

Expand Post »

What is the Importance and uses of data stuctures in Programming using C/C++ when using it?
.How Stack,Queue,and list works and give example problem that solve stacks (note:this is not a code program).t.y..i want your different opinions...pls...reply this tread..
Similar Threads
Reputation Points: 13
Solved Threads: 0
Newbie Poster
Marthy is offline Offline
2 posts
since Jul 2006
Jul 11th, 2006
1

Re: Data Structures???

>What is the Importance and uses of data stuctures in Programming using C/C++ when using it?
That should be intuitively obvious. Data is critical to programming and storing that data in effective ways is equally critical.

>How Stack,Queue,and list works and give example problem that solve stacks
This reeks of homework. As such, I'll fall back on the usual answer of "show me yours and I'll show you mine".
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Jul 12th, 2006
0

Re: Data Structures???

Quote ...
What is the Importance and uses of data stuctures in Programming using C/C++ when using it?

I think data storage and retrieval + usage of memory effeciently etc are the concepts that are the basis of Data Structure,...
answer my Few Question: -

In a drawing software can you tell me how many shapes are needed ?

In a Account Management System how many account holder your program can handle ?

this leads to the memory management, people often answer that they would utilize the heap to solve such problems....okey fine you utilizes the heap. now let talk about the retrieval of data...... infact you need the dynamic linkage between account holder to go forth and back...........how would you implement search! i.e. how can you figure out the specific account holder..... there are several problems which directly maps to the data structures....

Array is also a data structure , that provides you with Random Iterator . i.e. you can get anywhere within the bounds by indexing....why you need arrays. Again if you don't know how many of ints you need ? what you will do ? you'll either create a list or vector(similar to arrays).....................

Data structure not only stores information in a decent way but also provide the decent retrieval interface required by the problem... list, queues, stacks are linear structures you can think beyond that, Associative Structures.... maps in C++.

HOW STACK, QUEUES and list works
The three structures above are linear structure they provide different ways of retrieval, list is the most general structure that provide you to enter data at the beginning or at the end (dequeue=double ended queue). stack is the special structure allows you to enter the values on the top (like stacks of plates you can put(push) the plate on the top and remove(pop) from the top).. the opposite operation is provided by Queue....its depends upon your requirements whether to use the stacks or queues......

Hope you get the idea........
Reputation Points: 113
Solved Threads: 20
Junior Poster
Laiq Ahmed is offline Offline
147 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: file input don't know where to start
Next Thread in C++ Forum Timeline: stupid string replace! (c++)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC