LeetCode #234. Palindrome Linked List
🔒
https://dev.to
«Time Complexity: O(n)
Space Complexity: O(1)
class Solution {
public boolean isPalindrome(ListNode head) {
// trivially palindrome
if (head == null || head.next == null) return true;
...»
Automatische Weiterleitung...
1.5s