Please enable JavaScript.
Coggle requires JavaScript to display documents.
CS2 Summary - Coggle Diagram
CS2 Summary
Programming Techniques
-
-
-
Recursion -> A function which calls itself, must contain a stopping condition which must be reached a finite amount of times
Pass by Ref -> rectangle(x,y) the program will go to where the values x and y are stored and get them
Pass by Val -> rectangle(3,4 ) the program will input the values 3 and 4
Procedure -> Block of code 0, 1 or more parameters to complete a task
Function -> Takes 0, 1 or more parameters to complete a task and returns a value
-
Search Algorithms
Binary Search -> Find middle number and compare value, If value is higher disregard all higher values. If lower disregard lower. Keep splitting in half until value is found
Linear Search -> Compare 1st value, If correct stop, If incorrect move from left to right comparing each value
Varibles
Local Variable -> Declared within a sub routine, Local Scope and is terminated when subroutine ends
Global Variable -> Declared at the beginning of a program, Global Scope, is terminated at the end of the program