OCR A level Computer Science Paper 2 Exam Revision Questions and Answers
Abstraction Representation that is arrived at by removing unnecessary details Pop Remove and return the last item from a list/data structure Push To add an item to the top of a stack/end of a queue/list Depth First Traversal Each node in one branch is visited before backtracking to explore the next branch. Breadth First Traversal Begins at a root node and inspects all the neighboring nodes. Then for each of those neighbor nodes in turn, it inspects their neighbor nodes which were unvisited, and so on. Binary Tree a tree in which each node has at most two children. Binary Search Tree A binary tree with the property that for all parent nodes, the left subtree contains only values less than the parent, and the right subtree contains only values greater than the parent. This means it can be searched quickly Pre-Order Traversal The process of systematically visiting every node in a tree once, starting with the root node, proceeding to the left along the tree and accessing the node when the "left" side of the node is encountered. In-Order Traversal The process of systematically visiting every node in a tree once, starting at the root and proceeding left down the tree, accessing the first node encountered at its "center", proceeding likewise along the tree, accessing each node as encountered at the "center". Post-Order Traversal The process of systematically visiting every node in a tree once, starting at the root and proceeding left down the tree, accessing the first node encountered at its "right" side, proceeding likewise along the tree, accessing each node as encountered at its "right" side. Why are reusable components necessary? Functions that are performed all the time and that are complicated to code can be stored as libraries to save time
Document information
- Uploaded on
- June 4, 2024
- Number of pages
- 4
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers