CS 301 - Short Notes
CS 301 - Short Notes
Glossary:
Abstract A set of data values and associated operations that are
Data Type: precisely specified independent of any particular
implementation. Also known as ADT
Array : In programming, a list of data values, all of the same type, any
element of which can be referenced by an expression
consisting of the array name followed by an indexing
expression. Arrays are part of the fundamentals of data
structures, which, in turn, are a major fundamental of
computer programming
AVL tree: A balanced binary search tree where the height of the two
subtrees (children) of a node differs by at most one.
Binary A complete binary tree where every node has a key more
Heap : extreme (greater or less) than or equal to the key of its parent.
Binary A specific type of tree data structure in which each node has
Tree : at most two subtrees, one left and one right. Binary trees are
often used for sorting information; each node of the binary
search tree contains a key, with values less than that key
added to left subtree and values greater than that key added
to the right subtree.
Bounded A queue limited to a fixed number of items.
Queue :
Circular A linked list in which the rear item refers back to the head
List : item
Collision : When two or more items should be kept in the same location,
especially in hash tables, that is, when two or more different
keys hash to the same value.
Collision A way of handling collisions, that is, when two or more items
Resolution should be kept in the same location, especially in a hash
Scheme : table. The general ways are keeping subsequent items within
the table (open addressing), keeping a list for items which
collide (direct chaining hashing or separate chaining
hashing), keeping a special overflow area, etc. Perfect hashes
avoid collisions, but may be time-consuming to create.
Complete A complete binary tree of depth d is the strictly binary tree all
Binary of whose leaves are at level d
Tree :
Data The term data structure refers to the way data is organized for
Structure use within a program. Correct organization of data can lead to
simpler and more efficient algorithms. Common data
:
structures are linked-lists, stacks, queues and trees.
Disjoint Set: A set whose members do not overlap, are not duplicated,
etc.
Dynamic An array whose size may change over time. Items are not only
Array : added or removed, but memory used changes, too.
FIFO : First in first out is a policy that items are processed in order of
arrival. A queue implements this.
Full Binary A binary tree in which each node has exactly zero or two
Tree : children.
Heap Each node in a tree has a key which is more extreme (greater
Property: or less) than or equal to the key of its parent.
Heap. : A complete tree where every node has a key more extreme
(greater or less) than or equal to the key of its parent. Usually
understood to be a binary heap.
Heapify : Rearrange a heap to maintain the heap property, that is, the
key of the root node is more extreme (greater or less) than or
equal to the keys of its children. If the root node's key is not
more extreme, swap it with the most extreme child key, then
recursively heapify that child's subtree. The child subtrees
must be heaps to start.
Height : The maximum distance of any leaf from the root of a tree. If a
tree has only one node (the root), the height is zero.
Insertion Sort by repeatedly taking the next item and inserting it into
Sort : the final data structure in its proper order with respect to
items already inserted.
Instance A class is a definition of a set of data and member functions.
: When space for the data is actually allocated, we say that a
member of the class has been instantiated. The instantiation
is called an instance of the class. Each instance has its own
set of data (there is also a mechanism in C++ to define data
that is only allocated once per class, and shared amongst all
instances of the class).
Left In a binary search tree, pushing a node N down and to the left
Rotation : to balance the tree. N's right child replaces N, and the right
child's left child becomes N's right child.
Level-order Process all nodes of a tree by depth: first the root, then the
Traversal : children of the root, etc.
LIFO : Last in first out is a policy that the most recently arrived item
is processed first. A stack implements this.
max-heap Each node in a tree has a key which is less than or equal to
property : the key of its parent.
Merge A sort algorithm that splits the items to be sorted into two
Sort : groups, recursively sorts each group, and merges them into a
final, sorted sequence.
min-heap Each node in a tree has a key which is greater than or equal
property: to the key of its parent.
Overload A term used to refer to the use of one symbol for more than
: one purpose. For instance, in mathematics the "-" symbol is
used both as a negation symbol and as a subtraction symbol.
In C++ the "<
Parameter: A value received by a called function from a calling function.
Perfect Binary A binary tree with all leaf nodes at the same depth. All
Tree : internal nodes have degree 2.
Quick- An in-place sort algorithm that uses the divide and conquer
Sort : paradigm. It picks an element from the array (the pivot),
partitions the remaining elements into those greater than and
less than this pivot, and recursively sorts the partitions
Sibling : A node in a tree that has the same parent as another node is
its sibling.
Tree : A data structure containing zero or more nodes that are linked
together in a hierarchical fashion
Union : The union of two sets is a set having all members in either set.