Created
February 7, 2017 21:29
-
-
Save tmosest/68f204951409e822db569aac8775f038 to your computer and use it in GitHub Desktop.
Constant Theta Complexity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This function has a constant space complexity. | |
* The function call and the variable declaration both take some memory but they don't grow with x. | |
*/ | |
public static int addThree(int x) | |
{ | |
int y = 3; | |
return x + y; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment