Data Structures and Algorithms#
Data Structures and Algorithms (DSA) represent the foundational building blocks of computer science that enable efficient data organization and problem-solving.
Data structures and algorithms go hand in hand. A data structure is not worth much if you cannot search through it or manipulate it efficiently using algorithms, and the algorithms are not worth much without a data structure to work on.
Theory and Terminology#
- Algorithm#
A set of step-by-step instructions to solve a specific problem.
- Data Structure#
A way of organizing data so it can be used efficiently.
- Time Complexity#
A meaasure of the amount of time an algorithm takes to run, depending on the amount of data the algorithm is working on.
- Space Complexity#
A measure of the amount of memory an algorithm uses, depending on the amount of data the algorithm is working on.
- Big-O Notation#
A mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity.
- Recursion#
A programming technique where a function calls itself.
- Divide and Conquer#
A method of solving complex problems by breaking them into smaller, more manageable sub-problems, solving the sub-problems, and combining the solutions. Recursion is often used when using this method in an algorithm.
- Brute Force#
A simple and straight forward way an algorithm can work by simply tring all possible solutions and then choosing the best one.
Topics