Big O: O(1)
23 April 2023 (Updated 23 April 2023)
In a nutshell
An algorithm is O(1)
when the runtime doesn’t change as the input size grows. For example, with a stack data structure, adding a new item to the stack will require a single operation regardless of whether you have then items in the stack or a million items.
Tagged:
Big O Notation
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment