上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 76 下一页
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). Y 阅读全文
posted @ 2019-09-12 11:30 Schwifty 阅读(117) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2019-09-11 11:44 Schwifty 阅读(119) 评论(0) 推荐(0)
摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 el 阅读全文
posted @ 2019-09-11 03:03 Schwifty 阅读(180) 评论(0) 推荐(0)
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2019-09-10 13:01 Schwifty 阅读(167) 评论(0) 推荐(0)
摘要: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 阅读全文
posted @ 2019-09-10 01:50 Schwifty 阅读(168) 评论(0) 推荐(0)
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: 阅读全文
posted @ 2019-09-06 08:12 Schwifty 阅读(123) 评论(0) 推荐(0)
摘要: Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the first elem 阅读全文
posted @ 2019-09-06 02:15 Schwifty 阅读(162) 评论(0) 推荐(0)
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2019-09-05 10:53 Schwifty 阅读(154) 评论(0) 推荐(0)
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2019-09-05 09:45 Schwifty 阅读(145) 评论(0) 推荐(0)
摘要: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL 阅读全文
posted @ 2019-09-05 01:53 Schwifty 阅读(127) 评论(0) 推荐(0)
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 76 下一页