摘要: 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? 判断单链表是否是回文的 C++(25ms): 阅读全文
posted @ 2018-03-20 16:18 __Meng 阅读(102) 评论(0) 推荐(0) 编辑
摘要: On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y 阅读全文
posted @ 2018-03-20 16:00 __Meng 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa 阅读全文
posted @ 2018-03-20 15:18 __Meng 阅读(408) 评论(0) 推荐(0) 编辑