上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 31 下一页
摘要: 题目: 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 is 1 -> 2 -> 阅读全文
posted @ 2017-03-03 05:54 panini 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikip 阅读全文
posted @ 2017-03-03 04:52 panini 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目: 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? 链接: http://leetcode.com/proble 阅读全文
posted @ 2017-03-01 06:01 panini 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in f 阅读全文
posted @ 2017-03-01 05:28 panini 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer, write a function to determine if it is a power of two. 链接: http://leetcode.com/problems/power-of-two/ 2/28/2017 看别人的。看来要注意各种比特运算 阅读全文
posted @ 2017-03-01 04:36 panini 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目: Invert a binary tree. to Trivia:This problem was inspired by this original tweet by Max Howell: 链接: http://leetcode.com/problems/invert-binary-tre 阅读全文
posted @ 2017-03-01 04:26 panini 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack 阅读全文
posted @ 2017-02-26 07:17 panini 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and 阅读全文
posted @ 2017-02-26 06:41 panini 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the 阅读全文
posted @ 2017-02-26 06:28 panini 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目: Reverse a singly linked list. 链接: http://leetcode.com/problems/reverse-linked-list/ 2/25/2017, Java 之前的错误:看起来第一遍没有任何问题,但是1->2居然是time limit exceede 阅读全文
posted @ 2017-02-26 06:07 panini 阅读(159) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 31 下一页