Linear Search Complexity

Keep getting error here. I am stumped. Can anyone point out to me what I am doing wrong, I am sure it is something simple that I’m not paying attention to. I started at the top and executed all the cells twice now.

You are trying to run this as a code, while it’s not. This is just a normal text, you need to change cell type.


I am new to this as well, but I think your error with: linear_search_complexity = O(N) is due to you are trying to assign linear_search_complexity to the result of the function O(), which is not what you wanted. Try putting a single or double quotes around the O(N) as in

linear_search_complexity = “O(N)”

should resolve your problem changing it to a “string” instead of a function.

Or as Sebastian said above, changing the cell type works too. You can change the cell type by pressing m in command mode to change it to a mark-up cell, or y to change it back to normal code cell.

Hope this helps.

1 Like