Big O Notation Flashcards

1
Q

What is Big O notation?

A

Big O notation, also known as time complexity, defines the longest time it can take for a program to perform an operation.

Example: O(1) Complexity refers to constant time complexity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is imperative programming?

A

Imperative programming uses a series of commands that specify what the computer must do and when, to achieve a desired result.

Key concepts include procedural programming and object-oriented programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is declarative programming?

A

Declarative programming focuses on what a program should accomplish rather than how to accomplish it. Programs describe their desired results without explicitly listing commands.

Example: When assembling furniture, imperative programming guides through each step, while declarative programming gives a picture of the finished piece.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is procedural programming?

A

Procedural programming follows a linear, step-by-step approach to creating software, where each procedure is usually a function or a set of functions.

Languages that follow procedural programming concepts include Pascal and Fortran.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is object-oriented programming (OOP)?

A

Object-oriented programming structures software into simple, reusable pieces of code, called classes, to create instances of objects.

Example: Classes like Dog can have instances like myDog, with shared basic methods like bark.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly