Data exam

0.0(0)
Studied by 4 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/35

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:22 PM on 2/21/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

36 Terms

1
New cards

Data Structure

A systematic way of organizing and accessing data.

2
New cards

Algorithm

A generic step-by-step set of instructions for solving a problem.

3
New cards

Program

An implementation of an algorithm in code.

4
New cards

Abstract Data Type (ADT)

A theoretical model of a data structure that specifies what operations are allowed but not how they are implemented.

5
New cards

Big O Notation

Describes the worst-case complexity of an algorithm.

6
New cards

O(1)

Constant time – operations take the same time regardless of input size.

7
New cards

O(n)

Linear time – performance scales directly with input size.

8
New cards

O(n²)

Quadratic time – performance scales with the square of input size.

9
New cards

O(log n)

Logarithmic time – performance scales logarithmically with input size.

10
New cards

O(bⁿ)

Exponential time – performance doubles with each additional input.

11
New cards

O(n!)

Factorial time – performance grows extremely fast with input size.

12
New cards

Inheritance

A class can inherit attributes and methods from another class.

13
New cards

Constructor (init)

A special function that initializes an object.

14
New cards

Import

Brings in external modules to use functions or classes.

15
New cards

Functions

Blocks of reusable code that perform a task.

16
New cards

Public attributes

Attributes that are accessible from anywhere.

17
New cards

Protected attributes

Conventionally private attributes that are still accessible.

18
New cards

Private attributes

Name-mangled attributes to prevent direct access.

19
New cards

str Method

Defines how an object is represented as a string.

20
New cards

Naming Conventions

Use snake_case for variables/functions and PascalCase for class names.

21
New cards

self Keyword

Refers to the instance of the class.

22
New cards

Stack (LIFO)

A data structure where the last item added is the first to be removed.

23
New cards

push(item)

Adds an item to the top of the stack.

24
New cards

pop()

Removes and returns the top item from the stack.

25
New cards

peek()

Returns the top item of the stack without removing it.

26
New cards

size()

Returns the number of elements in the stack.

27
New cards

is_empty()

Returns True if the stack is empty.

28
New cards

Queue (FIFO)

A data structure where the first item added is the first to be removed.

29
New cards

enqueue(item)

Adds an item to the back of the queue.

30
New cards

dequeue()

Removes and returns the front item from the queue.

31
New cards

Deque (Double-Ended Queue)

A data structure that allows insertion and removal from both ends.

32
New cards

add_front(item)

Adds an item to the front of the deque.

33
New cards

remove_front()

Removes and returns the front item from the deque.

34
New cards

Node

Basic building block for linked structures, stores data and points to the next node.

35
New cards

data

Stores the value of the node.

36
New cards

next

Points to the next node in a linked list.