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

1.4.2 b pt 2

1.4.2

QuestionAnswer
Trees Consists of nodes connected by pointers/edges; each node can be reached from anywhere
Tree parts - Node at the start is the root node - Nodes immediately down from any node are the children - Nodes at the very bottom of a tree are leaf nodes - A subtree is a set of nodes and edges from any node down all its descendents
Tree applications - Storing and managing file and folder structures - Family tree
Binary tree special type of graph Similar to a tree, with nodes/vertices and pointers/edges
Binary tree special rule Each node can only have 0, 1 or 2 children, so that each have: - A left pointer (to its ‘left child’) - data/value - A right pointer (to its ‘right child')
Array: Implementing binary tree in a table, with pointers set to null if there is no child node
Object-oriented: Implementing binary tree objects with a left and right pointer that may be set to null Class Node Element = “” Left_pointer = Node Right_pointer = Node End class
Binary tree diagram
Binary tree applications - Wireless networking - OS scheduling methods
Binary tree operations - Add - Delete - Binary search: returns data stored in a node - Pre order, in order and post order traversal: types of depth-first search - Breadth-first search
Add (binary tree) (object oriented)
Delete (binary tree)
Leaf node being deleted (delete, binary tree) 3. if previous node is greater then current, previous nodes left pointer equals null 4. And vice versa
One child (delete, binary tree) 3. If current is less then previous bode: a. Set the previous node’s left pointer to the current node’s left child 4. If it is greater then: a. Set the right pointer
Hibbard deletion (delete, binary tree)
Pre-order (binary tree) variation of depth-fist search (node-left-right) 1. Start at root node 2. Output node 3. Follow left pointer and repeat from step 2 recursively until there is no pointer to follow 4. Follow the right pointer and repeat from step 2 recursively, etc.
Pre-order diagram (binary tree)
In-order (binary tree) depth-first variation (left-node-right) Automatically sorts data as outputs 1. Start at root node 2. Follow left pointer and repeat from step 2 recursively until there is no pointer to follow 3. Output node 4. Follow the right pointer etc.
In-order diagram (binary tree)
Post-order (binary tree) depth-first variant (left-right-node) 1. Start at root node 2. Follow from left pointer and repeat from 2 recursively until there is no pointer to follow 3. Follow from the right pointer etc. 4. Output node
Post-order diagram (binary tree)
Types of binary tree Binary search tree: all values to the left are less than node’s value, vice versa
Hash tables Aims to immediately find an item in a sorted or unsorted list without comparing with other items Must be large enough to store all data items, often is larger to minimise collision Hashing function determines a hash value
Hash value position in a hash table
Good hashing function properties - Be calculated quickly - Result in as few collisions as possible - Use as little memory as possible
Collisions (hash tables) Where two items have the same hash value
Collisions solutions (hash tables) - Open addressing - 2D hash tables - Overflow table/linked list
Open addressing (hash tables) store the item in the next available space - To find the item use linear probing - This prevents other items other items from being stored in their correct locations, and lead to clustering
Linear probing a linear search from the hash value
Clustering where frequent collisions lead to long stretches of filled slots in the hash table
2D hash tables (like 2D arrays) prevent collisions by using chaining
Chaining placing more than one item at the same position
Overflow table/linked list allows chaining
Hash tables operations - add - delete - retrieve
Add (hash tables)
Delete (hash tables)
Retrieve (hash tables)
Hash tables applications - Databases - Password hashing
Created by: FlashCardFun!
 

 



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