上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find 阅读全文
posted @ 2020-07-13 10:34 十三w~w 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to 阅读全文
posted @ 2020-07-13 10:31 十三w~w 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Largest Number Given a list of non negative integers, arrange them such that they form the largest number. Example 1: Input: [10,2] Output: "210" Exam 阅读全文
posted @ 2020-07-12 18:21 十三w~w 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Fraction to Recurring Decimal Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If th 阅读全文
posted @ 2020-07-12 16:39 十三w~w 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Compare Version Numbers Compare two version numbers version1 and version2. If *version1* > *version2* return 1; if *version1* < *version2* return -1;o 阅读全文
posted @ 2020-07-12 14:31 十三w~w 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 机器学习算法——kNN 1. 算法原理 基本思想是物以类聚,相同类别的样本之间在特征空间中应当聚集在一起,因此对于新的数据点,根据其附近的K个邻居的类型可以对其进行预测。如下图所示,假设红、绿、蓝三种颜色的点分布在二维空间中,这对应着分类任务中的训练样点包含了3个类别,特征数量为2。如果现在我们希望 阅读全文
posted @ 2020-07-09 20:42 十三w~w 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Maximum Gap Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains le 阅读全文
posted @ 2020-07-08 14:20 十三w~w 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Find Peak Element A peak element is an element that is greater than its neighbors. Given an input array nums, where nums[i] ≠ nums[i+1], find a peak e 阅读全文
posted @ 2020-07-08 12:08 十三w~w 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Find Minimum in Rotated Sorted Array II Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4 阅读全文
posted @ 2020-07-07 15:35 十三w~w 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Find Minimum in Rotated Sorted Array Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5, 阅读全文
posted @ 2020-07-07 15:18 十三w~w 阅读(72) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页