上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 76 下一页
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
posted @ 2019-03-28 03:47 Schwifty 阅读(163) 评论(0) 推荐(0)
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2019-03-28 03:23 Schwifty 阅读(118) 评论(0) 推荐(0)
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2019-03-26 07:09 Schwifty 阅读(145) 评论(0) 推荐(0)
摘要: Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: E 阅读全文
posted @ 2019-03-26 06:40 Schwifty 阅读(133) 评论(0) 推荐(0)
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2019-03-21 08:20 Schwifty 阅读(113) 评论(0) 推荐(0)
摘要: 138. Copy List with Random Pointer Medium 1367395FavoriteShare 138. Copy List with Random Pointer Medium 1367395FavoriteShare Medium A linked list is 阅读全文
posted @ 2019-03-21 07:51 Schwifty 阅读(115) 评论(0) 推荐(0)
摘要: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Input: -1->5->3->4-> 阅读全文
posted @ 2019-03-16 11:59 Schwifty 阅读(130) 评论(0) 推荐(0)
摘要: Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the posi 阅读全文
posted @ 2019-03-16 11:17 Schwifty 阅读(126) 评论(0) 推荐(0)
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example: Input: n = 10 Outpu 阅读全文
posted @ 2019-03-16 09:58 Schwifty 阅读(129) 评论(0) 推荐(0)
摘要: 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. Example 阅读全文
posted @ 2019-03-16 08:52 Schwifty 阅读(117) 评论(0) 推荐(0)
上一页 1 ··· 64 65 66 67 68 69 70 71 72 ··· 76 下一页