上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 76 下一页
摘要: Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Input: 1->2->3->4->5->NULL, k = 2 Output: 4->5->1-> 阅读全文
posted @ 2019-08-21 03:52 Schwifty 阅读(144) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Example 2: 阅读全文
posted @ 2019-08-17 01:40 Schwifty 阅读(149) 评论(0) 推荐(0)
摘要: Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: Input: 1->2->3->4->5->NULL, m = 2, n = 4 Out 阅读全文
posted @ 2019-08-10 09:44 Schwifty 阅读(151) 评论(0) 推荐(0)
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2019-08-10 05:17 Schwifty 阅读(138) 评论(0) 推荐(0)
摘要: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2019-08-08 12:37 Schwifty 阅读(138) 评论(0) 推荐(0)
摘要: Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Note: Your algo 阅读全文
posted @ 2019-08-08 08:57 Schwifty 阅读(98) 评论(0) 推荐(0)
摘要: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of numsexcept nu 阅读全文
posted @ 2019-08-08 05:07 Schwifty 阅读(125) 评论(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 the  阅读全文
posted @ 2019-08-08 04:16 Schwifty 阅读(165) 评论(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 arr 阅读全文
posted @ 2019-08-08 03:20 Schwifty 阅读(149) 评论(0) 推荐(0)
摘要: There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following re 阅读全文
posted @ 2019-08-07 10:50 Schwifty 阅读(274) 评论(0) 推荐(0)
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 76 下一页