Data Structures???

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2006
Posts: 2
Reputation: Marthy is an unknown quantity at this point 
Solved Threads: 0
Marthy Marthy is offline Offline
Newbie Poster

Data Structures???

 
0
  #1
Jul 11th, 2006

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..
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,614
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 713
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Data Structures???

 
1
  #2
Jul 11th, 2006
>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".
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 147
Reputation: Laiq Ahmed will become famous soon enough Laiq Ahmed will become famous soon enough 
Solved Threads: 20
Laiq Ahmed Laiq Ahmed is offline Offline
Junior Poster

Re: Data Structures???

 
0
  #3
Jul 12th, 2006
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........
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC