Short answers 2

 0    10 Datenblatt    up804653
mp3 downloaden Drucken spielen überprüfen
 
Frage English Antworten English
Describe an Abstract Data Type (ADT). What is the function of an ADT?
Lernen beginnen
Abstract Data Type(ADT) is a collection of data and associated subprograms/methods stored as a single module. Function: An ADT enables you to interact with a data structure without having to know how the data structure is implemented and how it functions
Define a stack
Lernen beginnen
Stack is an ordered collection of objects in which insertions and deletions are restricted to one end. LIFO structure.
Backtracking is a technique used in recursion. Describe how backtracking works. Give an example of a backtracking algorithm.
Lernen beginnen
see the word doc!
Explain what is meant by a Breadth First Traversal of a binary tree. Which ADT is used to implement a Breadth First Traversal?
Lernen beginnen
Breadth first traversal: Proceed horizontally from the root to all of its children then to its children’s children and so on until all nodes have been processed. To implement this traversal a queue is used
Insert, in the order given, the following numbers into an initially empty Binary Search Tree (BST): 6, 2, 5, 1, 7, 9, 3, 8, 4
Lernen beginnen
r1 6 r2 2,7 r31,5,9 r4 3,8 r5 4
Describe a data structure. Give an example of a data structure
Lernen beginnen
ggg
Define a queue
Lernen beginnen
Queue is an ordered collection of objects in which insertions are restricted to one end (tail) and deletions are restricted to the other (head)
Explain what is meant by Tail End Recursion. Give an example of Tail End recursion. Justify your answer
Lernen beginnen
Tail end recursion occurs when there is one recursive call in an algorithm and this call is the very last thing the method does. eg reversing an array
Explain what is meant by a Depth First Traversal of a binary tree. Which data structure is used to implement a Depth First Traversal?
Lernen beginnen
Depth First Traversal: Proceed along a path from the root through one child to the most distant descendant of that first child before processing the second child To implement this traversal a stack is used
Describe a data structure. Give an example of a data structure
Lernen beginnen
A Data Structure consists of 2parts: Collection of elements each of which is either a data type or another data structure and A set of associations or relationships (the structure) involving the collection of elements.eg. Array, Linked List, Binary Tree

Sie müssen eingeloggt sein, um einen Kommentar zu schreiben.