Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

M2 - CCS0015

DATA STRUCTURES AND ALGORITHMS

QuestionAnswer
[T/F] The algorithm for displaying the elements of a linked list would require traversal. TRUE
[T/F] A circular linked list has 2 node pointers. FALSE /
[T/F] list.unique(); unique removes any element that has the same value as the element FALSE*
[T/F] list [int] myList; // is a valid declaration FALSE
Which of the following is an application of a stack? Group of answer choices Printer Spooler Calculator CPU Scheduling Sending of Network Packets CALCULATOR /
[T/F] During a POP operation in a STATIC STACK, the elements are being moved one step up. FALSE; top position of the stack is adjusted to remove the element that was previously on top /
[T/F] In a DYNAMIC STACK, the node that was POPPED is deleted. TRUE /
[T/F] Dynamic Stacks can be implemented using linked list. TRUE
[T/F] In a static stack, the variable stackSize will handle the total capacity of the stack. TRUE /
[T/F] In a dynamic stack, pointer TOP points to a fixed value in the linked list and does not move. FALSE; point to most recently added node /
[T/F] The STL function top returns a reference to the element at the top of the stack. TRUE /
[T/F] A stack container that is used to adapt to different containers, it is often referred to as a container adapter. TRUE /
[T/F] The STL empty function will yield a value of true if the stack has elements. FALSE; will yield false /
TRUE/FALSE: Each node in a linked list contains one or more members that represent data and a pointer which can point to another node. TRUE /
TRUE/FALSE: Appending a node means adding a node at the start of the list. FALSE; adding at the end
TRUE/FALSE: A linked list can grow or shrink in size as the program runs. TRUE /
TRUE/FALSE: STL lists are also efficient at adding elements at their back because they have a built-in pointer to the last element in the list. TRUE /
TRUE/FALSE: Use of template will make the ADT flexible in terms of accepting values of different data types. TRUE /
Below are characteristics of a dynamic stack, except: Can be implemented with a dynamic array
TRUE/FALSE: In a dynamic implementation of stack, the pointer TOP has an initial value of NULL. TRUE /
The following are 3 possible containers that can be used in implementing the STL Stack, except: ARRAY /
TRUE/FALSE: The STL stack container may be implemented as a vector, a list, or a deque. TRUE /
TRUE/FALSE: The STL function push retrieves an element at the top of the stack. FALSE; add an element instead of retrieving /
TRUE/FALSE: The delete operation only involves the removing of the node from the list without breaking the links created by the next pointers. TRUE /
TRUE/FALSE: cout << list.front() << endl; front returns a reference to the last element of the list. FALSE; outputs first
TRUE/FALSE: A doubly linked list has both a next and previous node pointers. TRUE /
TRUE/FALSE: In a DYNAMIC STACK the pointer TOP stays at the HEAD after a PUSH operation. FALSE; it gets updated to the newly added element /
TRUE/FALSE: In a dynamic stack, the pointer TOP is like the HEAD which always point to the first element of the linked list. TRUE /
TRUE/FALSE: A static stack is implemented using arrays. FALSE /
TRUE/FALSE: Invoking the STL function top will automatically retrieve the element and move the pointer. FALSE; top does not modify the stack or move the pointer
TRUE/FALSE: Using pop function automatically moves the top pointer to the next node without deleting the memory used. FALSE; purpose of pop is to remove top element from stack /
TRUE/FALSE: In inserting a node, finding its proper location and following a certain order is necessary. TRUE /
TRUE/FALSE: A linked list is a series of connected nodes, where each node is a data structure. TRUE /
TRUE/FALSE: cout << list.back() << endl; The back member function returns a reference to the last element in the list. TRUE /
What happens to the value of the TOP during a PUSH operation in a STATIC STACK? INCREMENTS BY 1
TRUE/FALSE: The initial value of index top in the static implementation of a stack is 0. FALSE /
This node is responsible to handle the data that will be added to the linked list. newNode
What is the value of TOP when the STATIC STACK is FULL? = to the (stack size-1)*
TRUE/FALSE: Below is a valid declaration of a dynamic stack implemented as a list: stack< int, list<int> > iStack; TRUE /
TRUE/FALSE: The list container, found in the Standard Template Library, is a template version of a doubly linked list. TRUE /
The manner in which a stack behaves? LIFO /
The following are stack operations except: CLEAR /
TRUE/FALSE: Pop function will always retrieve the top. TRUE /
TRUE/FALSE: The STL list function push_back is equivalent to inserting a node in a list. FALSE /
TRUE/FALSE: In addition to the data, each node contains a pointer, which can point to another node. TRUE /
Created by: ruskainas
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards