C949v4 Study Guide | Memorize Terms

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

1/33

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

34 Terms

1
New cards

Array

a collection of homogenous elements stored in contiguous memory locations. Each element can be accessed using its index

2
New cards

Linked List

is a linear collection of elements called nodes, where each node contains data and a reference (or pointer) to the next node in the sequence.

3
New cards

BST

where the left child contains values less than the parent, and the right child contains values greater than the parent.

4
New cards

Hash Table

a data structure that maps keys to values using a hash function, which transforms the key into an index in an array

5
New cards

Heap

a specialized tree-based data structure that satisfies the heap property

6
New cards

List

include insertion, deletion, and access by index

7
New cards

Tuple

(key, value)

8
New cards

Stack

a linear data structure that follows the Last-In-First-Out (LIFO) principle, meaning the last element added is the first one to be removed

push, pop, peek

9
New cards

Queue

a linear data structure that follows the First-In-First-Out (FIFO) principle, meaning the first element added is the first one to be removed

enqueue, dequeue

10
New cards

Deque

a linear data structure that allows insertion and deletion of elements from both the front and rear ends

11
New cards

Bag

(also known as a multiset) is a simple data structure that allows for storing a collection of elements where duplicate elements are allowed. Unlike a set, which requires all elements to be unique, a bag can contain multiple occurrences of the same element

12
New cards

Set

an abstract data structure that stores unique elements, with no specific order. It supports operations that allow the management of unique collections of data

13
New cards

Priority Queue

a specialized queue where each element has a priority assigned to it, and elements are processed based on their priority, with higher-priority elements being processed before lower-priority ones

14
New cards

Dictionary (Map)

a data structure that stores key-value pairs, where each unique key maps to a specific value. Provide efficient insertion, deletion, and lookup operations, typically in O(1) time on average due to the underlying hash table implementation

15
New cards

Boolean

Holds a true or false value

16
New cards

Int

Holds whole numbers

17
New cards

Char

Holds a single character

18
New cards

Floating Point, Double

Holds numbers with fractional parts

19
New cards

Garbage Collection

A process by which a computer's memory is automatically managed. It frees up memory that is no longer being used by the program.

20
New cards

Reference Count

A count of the number of times an object is referred to in a program.

21
New cards

Memory Allocation

The process of reserving memory space for an object in a program.

22
New cards

Linked Allocation

A memory allocation technique where memory is allocated in linked nodes. Each node contains a pointer to the next node

23
New cards

Sequential Allocation

A memory allocation technique where memory is allocated in a sequential manner.

24
New cards

Inheritance

allows you to create a new class that is based on an existing class, inheriting its attributes and methods.

25
New cards

Encapsulation

is the concept of restricting access to certain details of an object’s implementation. It involves using access specifiers to control the visibility of attributes and methods.

26
New cards

Access Specifiers

Python: Uses naming conventions (e.g., private or _private) rather than strict access specifiers.

C++: Uses public, protected, and private keywords to control access.

27
New cards

Polymorphism

allows objects of different classes to be treated as objects of a common base class, typically through method overriding.

28
New cards

Dijkstra's Algorithm

● Type: Greedy algorithm.

● Applicability: Works on graphs with non-negative edge weights.

● Time Complexity: O(V 2 ) for the simplest implementation, O(V log V+E) with a priority queue (using a binary heap), where V is the number of vertices and E is the number of edges.

● Functionality: It finds the shortest path from a single source vertex to all other vertices in a graph by iteratively selecting the vertex with the smallest known distance, updating the distances to its neighbors, and marking it as visited.

29
New cards

Bellman-Ford Algorithm

● Type: Dynamic programming algorithm.

● Applicability: Works on graphs with negative edge weights and can detect negative weight cycles.

● Time Complexity: O(V*E), where V is the number of vertices and E is the number of edges.

● Functionality: It calculates the shortest path from a single source vertex to all other vertices by relaxing all edges repeatedly over V−1 iterations.

30
New cards

Enumeration

a data type in programming that allows a variable to be a set of predefined constants

31
New cards

Attributes

Variables that hold data related to the class. They define the state of an object.

32
New cards

Methods

Functions defined within a class that operate on its attributes or perform actions.

33
New cards

Constructor

A special method that initializes objects of the class. It is called when an object is created.

34
New cards

Destructor

A method that cleans up when an object is destroyed (in C++). Python manages memory automatically, so a destructor is less commonly used.