No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Course Queries 4 Answers
manpreet
Best Answer
2 years ago
I am new to teaching the particular syllabus I have been asked to teach and I am confused by the approach given for several of the algorithms. For example the stack implementation based on the course materials given below seems very convoluted. I'm curious to hear if others would share my concerns if they had to teach about stacks in this way, or if they can offer any insight into the advantages of this approach.
The concerns I have which I'm curious to hear your opinion about are:
Using the call by reference approach makes the
push
andpop
calls very unwieldyIt looks like new items are added to the end of the list, making the algorithm O(n) rather than O(1)
The algorithm is hard to follow (IMO)
It is possible to implement a stack in a much simpler fashion, which would allow student to focus more on conceptual understanding of the behavior and use of stacks, and to see the link between the concept and the implementation more clearly.