Which queue-derived data type could facilitate the fastest algorithm to check if an string is a palindrome?

41 views Asked by At

I am wondering if using Deque data structure implemented by ArrayDeque could offer better performance in terms of time complexity compared to the queue implemented by an array or a linked list?

As far as I have understood, both implementations could be O(n) in the worst_case.

0

There are 0 answers