Question about learning C++ Linked Lists before Stacks....

Click For Summary

Discussion Overview

The discussion revolves around the importance of learning linked lists before stacks and queues in C++, particularly in the context of studying data structures. Participants explore the relationships between these data structures and their implementations.

Discussion Character

  • Conceptual clarification
  • Debate/contested
  • Homework-related

Main Points Raised

  • Some participants suggest that learning linked lists before stacks and queues is important, particularly when considering linked list implementations of these structures.
  • Others argue that it depends on the implementation; simple fixed-size stacks and queues can be created using arrays and pointers, which may not require prior knowledge of linked lists.
  • There is a viewpoint that in learning C or C++, it is often more effective to first understand stacks and queues before moving on to linked lists.
  • Some participants note that the principles of data structures are universal and can be applied across different programming languages, suggesting that the specific language (C++) is less relevant than the underlying concepts.

Areas of Agreement / Disagreement

Participants express differing opinions on the order of learning linked lists, stacks, and queues, with no clear consensus on whether one approach is definitively better than the other.

Contextual Notes

Some participants mention that linked lists are not included in their high school syllabus, which may influence their learning path. There is also a recognition that stacks can be implemented in various ways, which adds complexity to the discussion.

Who May Find This Useful

This discussion may be useful for students studying data structures, particularly those in high school or early college courses in computer science, as well as educators considering curriculum design.

sukalp
Messages
53
Reaction score
2
i wanted to ask you that in c++it is important we should learn linked list before learning stack,queue that i wanted to know while studying data structures
 
Technology news on Phys.org
I think it depends on whether the stacks and queues are implemented using linked lists or not.

Simple fixed size stacks and queues can be implemented using a couple of pointers and an array.

Linked lists allow for making more flexible variable sized stacks and queues.
 
  • Like
Likes   Reactions: FactChecker and QuantumQuest
sukalp said:
i wanted to ask you that in c++it is important we should learn linked list before learning stack,queue that i wanted to know while studying data structures

Agree to jedishrfu. In general, things when learning C or C++, go the other way around (first simple stacks and queues using pointers then linked lists) which is equally effective. But, the way you describe can serve well too.
 
QuantumQuest said:
Agree to jedishrfu. In general, things when learning C or C++, go the other way around (first simple stacks and queues using pointers then linked lists) which is equally effective. But, the way you describe can serve well too.

yes as linked list is not there in syllabus in our high school
i asked because there were programs given using linked list implemention of stack
so i asked we should know linked list before stack,queue
i got the answer
once again you solved mu confusion and doubt

thanks sir
 
jedishrfu said:
I think it depends on whether the stacks and queues are implemented using linked lists or not.

Simple fixed size stacks and queues can be implemented using a couple of pointers and an array.

Linked lists allow for making more flexible variable sized stacks and queues.

okay sir
i understood
thanks you sir for clearing for confusion

once again thanks
your answer is helping me computer science in c++ in high school class 12
thanks
 
The C++ is not relevant, the data structure is universal. As lon as you understand the concept, you can implement them in any language.

I doubt very many stacks are implemented with lists. You can really implement them in many different ways as long as they satisfy the criteria.
 
newjerseyrunner said:
The C++ is not relevant, the data structure is universal. As lon as you understand the concept, you can implement them in any language.

I doubt very many stacks are implemented with lists. You can really implement them in many different ways as long as they satisfy the criteria.
yes right through array . pointers,structures
thanks
 

Similar threads

Replies
86
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 133 ·
5
Replies
133
Views
12K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 25 ·
Replies
25
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K