


#List stack queue exercises generator#
The most exciting development is the automated question generator and verifier (the online quiz system) that allows students to test their knowledge of basic data structures and algorithms. VisuAlgo is an ongoing project and more complex visualizations are still being developed. However, we are currently experimenting with a mobile (lite) version of VisuAlgo to be ready by April 2022. The minimum screen resolution for a respectable user experience is 1024x768 and only the landing page is relatively mobile-friendly. VisuAlgo is not designed to work well on small touch screens (e.g., smartphones) from the outset due to the need to cater for many complex algorithm visualizations that require lots of pixels and click-and-drag gestures for interaction. Though specifically designed for National University of Singapore (NUS) students taking various data structure and algorithm classes (e.g., CS1010/equivalent, CS2040/equivalent, CS3230, CS3233, and CS4234), as advocators of online learning, we hope that curious minds around the world will find these visualizations useful too. Today, a few of these advanced algorithms visualization/animation can only be found in VisuAlgo. VisuAlgo contains many advanced algorithms that are discussed in Dr Steven Halim's book ('Competitive Programming', co-authored with his brother Dr Felix Halim and his friend Dr Suhendry Effendy) and beyond. Therefore, their implementations are also quite similar.VisuAlgo was conceptualised in 2011 by Dr Steven Halim as a tool to help his students better understand data structures and algorithms, by allowing them to learn the basics on their own and at their own pace. The stack ADT is very similar to the list ADT Object dequeue() remove and return the item from the front of the queue Void enqueue(Object ob) add ob to the rear of the queue Int size() return the number of items in the queue Queue() (constructor) create an empty queueīoolean empty() return true iff the queue is empty The only item that can be removed is the one at the front of Items can only be added at the rear of the queue, and Values in -> items in the queue -> values outĪ queue is a First-In-First-Out (FIFO) data structure. The conceptual picture of a queue is something like this: Not remove it (error if the stack is empty) Object peek() return the item that is on the top of the stack, but do Object pop() remove and return the item from the top of the stack Void push(Object ob) add ob to the top of the stack Int size() return the number of items in the stack

Stack() (constructor) create an empty stackīoolean empty() return true iff the stack is empty The only item that can be taken out (or even seen) is the most recentlyĪdded item a stack is a Last-In-First-Out (LIFO) data structure. Think of a stack of newspapers, or trays in a cafeteria. The conceptual picture of a stack is something like this: They can both be implemented either using an array or using a linked list Comparison of Array and Linked-List Implementationsīoth stacks and queues are like lists (ordered collections of items),.
