Big O Notation Flashcards
What is Big O notation?
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.
What is imperative programming?
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.
What is declarative programming?
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.
What is procedural programming?
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.
What is object-oriented programming (OOP)?
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.