sukalp
- 53
- 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
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.
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.
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.
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 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
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.
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.
yes right through array . pointers,structuresnewjerseyrunner 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.