Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrected time complexity of Stack and Queue Access and Search Operations #163

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

iqmd
Copy link

@iqmd iqmd commented Feb 3, 2024

🔄 Pull Request: Update Time Complexity for Stack and Queue Access and Search Operations

Changes Proposed:
In this pull request, I propose updating the time complexity for accessing and searching elements within the Stack and Queue to be marked as N/A.

Details:

  • Old Documentation:
    • Stack and Queue access and search operations were previously O(N) .
  • Proposed Documentation:
    • Updated the time complexity to N/A.

Note: While accessing the top element is a constant time operation and we might be able to search or access with several peek() operations in O(n) time complexity but it's not supported by both stack and queue ADT.

@iqmd iqmd changed the title corrected time complexity of Stack and Queue Access Operations corrected time complexity of Stack and Queue Access and Search Operations Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant