摘要:
Problem Definition: Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space?思路:为了达到O(1)... 阅读全文
摘要:
Problem Definition: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definiti... 阅读全文
摘要:
Problem Definition: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked... 阅读全文