QUESTIONS AND ANSWERS; 100%
PASS GUARANTEED; GRADED A+
A binary tree is complete if: - correct answer- all
levels except possibly the last are completely full, and the last
level has all its nodes to the
left side
A binary tree is full if: - correct answer- every node
contains 0 or 2 children.
A binary tree is perfect if: - correct answer- if all
internal nodes have 2 children and all leaf nodes are at the same
level.
Abstract Data Type (ADT) - correct answer- A data
type described by predefined user operations, such as "insert
data at rear," without indicating how each operation is
implemented.
,Array - correct answer- A data structure that stores
an ordered list of items, with each item is directly accessible by a
positional index.
Array based list - correct answer- A list ADT
implemented using an array. An array-based list supports the
common list ADT operations, such as append, prepend, insert
after, remove, and search.
Array in Java - correct answer- generic class that
supports different data types. declared as follows, where T is the
data type.
Assignment vs comparison - correct answer- = vs ==
Bag - correct answer- An ADT for storing items in
which the order does not matter and duplicate items are
allowed.
Underlying data structures: Linked list, Array
,Bianary Search Tree - correct answer- A data
structure in which each node stores data and has up to two
children, known as a left child and a right child.
Big-O Average runtime complexity - correct answer-
Selection sort O(N2) Not fast
Insertion sort O(N2) Not fast
Shell sort O(N1.5) No fast
Quicksort O(NlogN) fast
Merge sort O(NlogN) fast
Heap sort O(NlogN) fast
Radix sort O(N) fast (integer only)
Big-O Complexity Chart - correct answer- Best to
worst
O(1)
O(log n)
O(n)
O(n log n)
O(n^2)
, O(2^n)
O(nl)
Binary search - correct answer- is an algorithm that
searches a SORTED LIST for a key by first comparing the key to
the middle element in the list and recursively searching half of
the remaining list so long as the key is not found.
Binary search tree (BST) - correct answer- An
especially useful form of binary tree, which has an ordering
property that any node's left subtree keys ≤ the node's key, and
the right subtree's keys ≥ the node's key. That property enables
fast searching for an item, as will be shown later.
*When searching, search always starts at the root
Binary Tree - correct answer- In a list, each node has
up to one successor. In a binary tree, each node has up to two
children, known as a left child and a right child. "Binary" means
two, referring to the two children.
BST inorder traversal - correct answer- Visits all
nodes in a BST from smallest to largest, which is useful for