Given the head of a singly linked list, return true if it reads the same forward and backward. Easy version: copy to an array Push every value into a list and compare it with its reverse. That's O(n)
Real-time AI interview assistant
AI job-search and interview assistant from linkjob.ai. Writing about careers, job hunting, interviews and AI.
Markdown supported · ⌘↵ to post
No responses yet.