Term
|
Definition
| So polymorphism is the ability (in programming) to present the same interface for differing underlying forms (data types). |
|
|
Term
|
Definition
| unit testing is a method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures are tested to determine if they are fit for use |
|
|
Term
|
Definition
| In python, a child class uses this method to invoke functionality defined in the parent class |
|
|
Term
| What is function uses O(n^2) |
|
Definition
|
|
Term
| How does binary search work? |
|
Definition
half-interval search algorithm, halves a list.
In each step, the algorithm compares the search key value with the key value of the middle element of the array. If the keys match, then a matching element has been found and its index, or position, is returned. Otherwise, if the search key is less than the middle element's key, then the algorithm repeats its action on the sub-array to the left of the middle element or, if the search key is greater, on the sub-array to the right. If the remaining array to be searched is empty, then the key cannot be found in the array and a special "not found" indication is returned. |
|
|
Term
|
Definition
| Inheritance is used to indicate that one class will get most or all of its features from a parent class. |
|
|
Term
|
Definition
changing human language into machine language (0's , 1's
A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code).[1] The most common reason for wanting to transform source code is to create an executable program. |
|
|
Term
|
Definition
| A software tool that immediately executes the source code specified in a high level programming language. |
|
|
Term
|
Definition
| Method overriding, in object oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes. The implementation in the subclass overrides (replaces) the implementation in the superclass by providing a method that has same name, same parameters or signature, and same return type as the method in the parent class. |
|
|
Term
| what is the garbage collector |
|
Definition
| Python's virtual machine that is responsible for reclaiming the memory used by unneeded objects. |
|
|
Term
|
Definition
| An input that represents a separation between two equivalence partitions. |
|
|
Term
|
Definition
| An array data structure that stores elements next to eachother. |
|
|
Term
| Accessing an element at any position in the structure? |
|
Definition
Big O for an array: O(1) Big O for linked: O(n) |
|
|
Term
| adding an element at either the beginning or the end |
|
Definition
Big O for an array: O(n) Big O for linked: O(1) |
|
|
Term
| adding an element in the middle |
|
Definition
Big O for an array: O(n) Big O for linked: O(n) |
|
|
Term
| deleting an element from either the beginning or the end |
|
Definition
Big O for an array: O(1) Big O for linked: O(n) |
|
|
Term
| Deleting an element from the middle |
|
Definition
Big O for an array: O(n) Big O for linked: O(n) |
|
|
Term
| What is binary search's Big O? |
|
Definition
|
|
Term
| what is the recursion of copy |
|
Definition
def copy(lst): if not lst: return [] else: return [first(lst)] + copy(rest(lst)) |
|
|
Term
| Python is both a ____ and a _____ |
|
Definition
|
|
Term
| What does the quicksort function look like: |
|
Definition
def partition(lst, start, end): pos = start # condition was obsolete, loop won't # simply run for empty range
for i in range(start, end): # i must be between start and end-1 if lst[i] < lst[end]: # in your version it always goes from 0 lst[i],lst[pos] = lst[pos],lst[i] pos += 1
lst[pos],lst[end] = lst[end],lst[pos] # you forgot to put the pivot # back in its place return pos
def quick_sort_recursive(lst, start, end): if start < end: # this is enough to end recursion pos = partition(lst, start, end) quick_sort_recursive(lst, start, pos - 1) quick_sort_recursive(lst, pos + 1, end) |
|
|
Term
| What does Merge Sort's recursive "else" look like? |
|
Definition
else: if first(lst_a) < first(lst_a): return [first(lst_a)] + merge(rest(lst_a),lst_b) else: return [first(lst_b)] + merge(rest(lst_a),lst_b) |
|
|
Term
|
Definition
| is an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously processed inputs. |
|
|
Term
|
Definition
|
|