Question: How can you implement a stack with an array?
Instructor answer: Keep the top of the stack toward the end of the array, so the push and pop operations will add or remove elements from the right side of the array.

Student answer: An array has a fixed size.  You can add and delete elements to the end of the array and you use a pointer to keep track of the last element added.  Each time you add or delete an element you update the pointer and check if it is equal to the max size of the array.
Score (0-5): 5

Student answer: By implementing an array of a pre-defined size with the bottom stack element stored at element 0 and the last element stored in the array is the top. You increment top when an element is pushed and you decrement it when an item is popped.
Score (0-5): 5

Student answer: If you use a dynamically allocated array, you must provide a destructor and copy constructor.
Score (0-5): 3

Student answer: Create a int value that stores the "head" of the stack. Increment the top when one element is pushed and decrement after it is popped.
Score (0-5): 5

Student answer: Use a pointer that always points to the end of the array list for push/pop modifications.
Score (0-5): 4.5

Student answer: if you used an array to implement a stack when you add an element just add it to the end of an array and remove items from end of array also.
Score (0-5): 4.5

Student answer: You predetermine the size of the stack as you would an array.  This type can not grow.
Score (0-5): 2.5

Student answer: Declare a variable that points the last item in the array, which increases (++) when items are pushed onto the stack, and decreases (--) when an item is popped off the top.
Score (0-5): 5

Student answer: Allocate an array of some size. The bottom stack element is stored at some element. Last index in the array is the top. Increment top when one element is pushed, decrement after pop.<br>
Score (0-5): 4.5

Student answer: You allocate an pre-defined array, the bottom element is stored at element 0, and the last index is the head.
Score (0-5): 4

Student answer: Make an array, make the bottom at spot 0, make the last spot in the array the top, and increment top when you ad
Score (0-5): 4.5

Student answer: treat the beginning of the array as the beginning of the stack
Score (0-5): 4

Student answer: Use an index value called top to keep track of the last element in the array.
Score (0-5): 4.5

Student answer: create an array and implement pointers that point to the next list item down and stack them up.
Score (0-5): 2

Student answer: for efficiency it is easiest to implement the left to right method, with the right most item being the one that is retrieved when a pop is performed, and a push places an object on the furthest element.
Score (0-5): 3.5

Student answer: Create an array based on a pre-defined size N<br>There can't be more elements than N.<br><br>Bottom stack element stored at element 0<br>last index in the array is the top<br><br>Increment top when one element is pushed, decrement after pop
Score (0-5): 4.5

Student answer: with the element added to the array, so that the last element added is at the end, and when the element is popped it takes the last element off the array
Score (0-5): 4

Student answer: Allocate an array of some pre-defined size. Bottom stack element stored at element 0. The last index in the array is the top. Increment top when one element is pushed.
Score (0-5): 4.5

Student answer: Create an array, size N.  N++ when one element is pushed.  N-- when one element is popped.
Score (0-5): 4

Student answer: define an array and keep track of a pointer to the last element as items are added
Score (0-5): 4

Student answer: By allocating an array of predetermined size, and an integer to track the top element of the stack. The bottom member of the stack will go in element 0 of the array, and for each element pushed the "top" tracking integer is incremented.
Score (0-5): 4.5

Student answer: Allocate an array of some size, bottom stack element stored at element 0
Score (0-5): 4

Student answer: you store the stack in the array but you have to keep in mind the first element
Score (0-5): 3

Student answer: You keep track of the last item entered into the array and do not<br> allow the user access to the other parts of the array.
Score (0-5): 4

Student answer: using arrays, you are pushing one int at a time into the stack until you get to the end of your array
Score (0-5): 4

Student answer: by having a max number of elements, allocating an array with that number of elements, storing the elements starting at 0, and keeping track of how many elements are currently in the list
Score (0-5): 4

Student answer: Stack usually holds a bunch of items with the same type, therefore u can use an array, to hold the content of the stack and an integer top that holds the index of the element at the top of the stack. u Choose an array size. Then the sequence of operations used. u have to decide what data types are needed for this stack data structure.
Score (0-5): 3