CMSC 132: Object-Oriented Programming II

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/22

flashcard set

Earn XP

Description and Tags

Practice flashcards based on lecture notes for CMSC 132: Object-Oriented Programming II.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

23 Terms

1
New cards

Set ADT

An abstract data type representing a collection of unique elements without duplicates or specific order.

2
New cards

Map ADT

An abstract data type consisting of key-value pairs, with unique keys for efficient value retrieval.

3
New cards

Insertion (add)

A Set operation that adds an element if it is not already present.

4
New cards

Deletion (remove)

A Set operation that removes an element if it exists.

5
New cards

Search (contains)

A Set operation that checks whether a specific element is present.

6
New cards

Union

A Set operation that returns a new set containing all elements from both sets.

7
New cards

Intersection

A Set operation that returns a new set with elements common to both sets.

8
New cards

Difference

A Set operation that returns a new set with elements in the first set that are not in the second.

9
New cards

Naive Implementations of Sets

Sets implemented using arrays result in O(n) operations for insertion, search, and removal.

10
New cards

Hash Table

A data structure that uses a hash function to efficiently map keys to values.

11
New cards

Collision

An event that occurs when two keys hash to the same index in a hash table.

12
New cards

Load Factor (λ)

The ratio of the number of entries in a hash table to its size; impacts performance.

13
New cards

Rehashing

The process of resizing and reorganizing a hash table when its load factor becomes too high.

14
New cards

TreeMap

A Map implementation that stores keys in sorted order using a Red-Black Tree.

15
New cards

Binary Search Tree (BST)

A binary tree where each node's left children are less than the node, and right children are greater.

16
New cards

Quick Sort

A divide-and-conquer sorting algorithm with an average time complexity of O(n log n).

17
New cards

Merge Sort

A stable divide-and-conquer sorting algorithm that runs in O(n log n) time.

18
New cards

Binary Tree Traversal

The method of visiting all the nodes in a binary tree in a systematic manner: pre-order, in-order, post-order.

19
New cards

Leaf Node

A node in a tree that has no children.

20
New cards

Root Node

The topmost node in a tree with no parent.

21
New cards

Height of a Tree

The number of edges in the longest path from the root to a leaf node.

22
New cards

Depth of a Node

The number of edges from the root to the node.

23
New cards

AVL Tree

A self-balancing binary search tree that maintains balance to ensure O(log n) operations.