
LeetCode
Wenju-Huang
计算机视觉方向小硕一枚,热衷科研技术,关注计算机视觉,机器学习,机器人,信号处理,移动通信等领域。希望能结识更多同道中人
展开
-
LeetCode-Delete Node in a Linked List
LeetCode-Delete Node in a Linked List*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 -> 3 -> 4 and you原创 2015-07-27 10:53:45 · 365 阅读 · 0 评论 -
LeetCode-Palindrome Linked List
题目: 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?解释: 判断一个数是否为回文数(即这个数顺着看和倒着看相同,如1234321)。 一开始想的是用堆栈实现,但空间复杂度度不符合要求,一时想不到思路。虽然提示原创 2015-07-29 23:13:59 · 518 阅读 · 0 评论 -
LeetCode-Linked List Cycle
在准备国电,忙里偷闲刷了一道题,还是简单的链表题(有空再学习另外类型了); 题目:Linked List Cycle Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?解释:要求在不开辟其他内存的前提下判断一个链表是不是循环列原创 2015-08-01 10:23:55 · 359 阅读 · 0 评论 -
LeetCode-Linked List Cycle II
题目:LeetCode-Linked List Cycle IIGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up: Can you solve it without using extra space?解释: 做了1就忍不住要做2原创 2015-08-01 15:04:23 · 472 阅读 · 0 评论 -
LeetCode-Ugly Number
国电结束了,终于又有时间来刷题了,不过,这么多天不刷,有点不想再刷了的感觉。 今天来一道简单的,寻找丑数。 Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For原创 2015-08-20 14:15:55 · 386 阅读 · 0 评论 -
LeetCode-Median of Two Sorted Arrays
LeetCode-Median of Two Sorted Arrays想不到距离上次刷LeetCode已经有两年了,惭愧惭愧。希望这次能坚持刷下去,先全部刷完LeetCode再刷其他的oj系统。博客以后只用来整理经典、有意义的问题今天写的是一道经典的查找题Median of Two Sorted Arrays: There are two sorted arrays nums1 and num原创 2017-09-21 10:44:46 · 401 阅读 · 0 评论