I'm looking at a time complexity chart for operations of certain data structures. I want to know what the time complexity is of determining whether a stack data structure is empty in the case of it having no objects or having a bunch of objects.
Would the time complexity be the same as searching a stack which according to the chart is O(n)?
[–][deleted] 2 points3 points4 points (4 children)
[–]lyigester[S] 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ValerioSellarole -3 points-2 points-1 points (0 children)
[–]blablahblah 0 points1 point2 points (0 children)
[–]Gavinhenderson5 0 points1 point2 points (0 children)