Skip to main content

All Questions

1 vote
2 answers
267 views

More efficient alternative that checks if a list can be made a palindrome

For my algorithms and data structures class, I have to write an algorithm that is more efficient in the worst case than the following algorithm: def algo_X(A): i = 0 j = len(A)-1 while i &...
user avatar