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

BarbaraWidjono, Edges, integer_palindrome_check #20

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

Conversation

BarbaraWidjono
Copy link

Time Complexity: O(n/2) --> O(n). The integer is converted to a string then iterated from index 0 and string.length - 1. Half the string is iterated through, but since constants are dropped, the final time complexity is O(n).

Space Complexity: O(1), the variables within the method do not require additional memory space.

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