Skip to content

Commit

Permalink
add runtime complexity note
Browse files Browse the repository at this point in the history
  • Loading branch information
vaskoz committed Oct 10, 2018
1 parent 1b9e758 commit 465e57f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions day50/problem.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type ArithmeticTree struct {
}

// Calculate takes an ArithmeticTree and returns its calculated value.
// Runs in O(N) in that it only views the tree nodes once.
func Calculate(tree *ArithmeticTree) int {
if tree.op == NON {
return tree.val
Expand Down

0 comments on commit 465e57f

Please sign in to comment.