Unit 10: Recursion Flashcards
ArrayList
A dynamic data structure that allows you to store and manipulate collections of objects. Unlike arrays, ArrayLists can grow or shrink dynamically as needed.
Call Stack
A data structure that keeps track of function calls in a program. It stores information about the order and location of function calls, allowing the program to keep track of where to return after each function call is completed.
Iterative Code
Refers to programming constructs or algorithms that involve repetition using loops. It allows for executing a block of code multiple times until certain conditions are met.
Recursion
A programming technique where a function calls itself to solve a problem by breaking it down into smaller, similar subproblems.
Traversal
Refers to the process of visiting and accessing each element in a data structure, such as an array or a tree, in a specific order.
Arrays.copyOfRange
A method in Java that creates and returns a new array containing elements from another array within specified range indexes (start index inclusive and end index exclusive).
Binary Search
An efficient algorithm used to locate a target value within a sorted array by repeatedly dividing the search interval in half.
Conquer Step
The part of an algorithm where the solutions to smaller subproblems are combined or merged together to solve the original problem.
Divide Step
A strategy used in problem-solving algorithms where a complex problem is divided into smaller, more manageable subproblems.
Factorial
Refers to the product of an integer and all the positive integers below it. For example, the factorial of 5 (written as 5!) is equal to 5 x 4 x 3 x 2 x 1.
Merge Sort
An efficient, comparison-based sorting algorithm that divides an unsorted list into smaller sublists, sorts those sublists recursively, and then merges them back together to obtain a sorted list.
Sequential Search
Another term for linear search, where each element in a list is checked one by one until the target value is found or the end of the list is reached.
traverseArray
Accessing each element of the array one by one, usually in a sequential manner.
Recursive Call
When a function calls itself within its own code, allowing for repetitive execution of the same set of instructions.
Abstraction/Method Writing
The process of simplifying complex systems by breaking them down into smaller, more manageable parts. Method writing refers to defining behaviors or actions that an object can perform.
Algorithm Analysis
The process of evaluating the efficiency and performance of an algorithm. It involves analyzing factors such as time complexity, space complexity, and scalability to determine how well an algorithm will perform in different scenarios.
Algorithms
Step-by-step procedures or instructions for solving problems or performing tasks. They provide clear instructions on how to solve problems efficiently.