摘要: 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?题目意思: 给定一个单链表,判断它是不是回文串 进一步思考: ... 阅读全文
posted @ 2015-08-02 17:12 OpenSoucre 阅读(297) 评论(0) 推荐(0) 编辑
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is1 -> 2 -> 3 -> ... 阅读全文
posted @ 2015-08-02 15:50 OpenSoucre 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= "car", retur... 阅读全文
posted @ 2015-08-02 15:44 OpenSoucre 阅读(284) 评论(0) 推荐(0) 编辑