1/6
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
how to define 2D arrays
int [][] A = new int [3][4];
in [] [] A = {{1,0,12},(1,2,3}};
How are Array stored in Ram
The Variable holds a reference to an array witch holds a reference to multiple other arrays
Recursion
a definition that quotes itself to define itself
Binary Search with Recursion
Hanoi Tower
move a tower of N disk from stack 0 to stack 1
only one disk can be moved at a time
solve the subproblem
move n-1 disk to stack 2
move nth disk from stack 0 to 1
move n-1 tack 2 to stack 1
Recursive Sorting Quick Sort
select middle item as pivot
put smaller items to the left, larger items to the right
quick sort the left, quicksort the right
one a subsequence only has one item, no sorting is required