上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: 函数功能 :指向序列之中数组最大元素,包含在algorithm库中。 函数返回迭代器,时间复杂度O(n)。 版本一 运用实例: "Leetcode 969. Pancake Sorting" 参考书籍 : 《STL源码剖析》 阅读全文
posted @ 2019-01-07 20:38 我的小叮当 阅读(1808) 评论(0) 推荐(0) 编辑
摘要: 函数功能 :将序列[first,last)的元素在原容器中颠倒重排,包含在algorithm库中。 reverse()函数无返回值,时间复杂度O(n)。 可以看到函数中是last是先减一。应当理解的是vector.end()是指向数组最后一个元素后面的位置。 reverse(v.begin(), v 阅读全文
posted @ 2019-01-07 20:09 我的小叮当 阅读(877) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://leetcode.com/problems/pancake sorting/" Level: Medium Discription: Given an array A, we can perform a pancake flip: We choose some pos 阅读全文
posted @ 2019-01-07 19:45 我的小叮当 阅读(536) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://leetcode.com/problems/array nesting/" Level: Easy Discription: Say you have an array for which the ith element is the price of a given 阅读全文
posted @ 2019-01-06 13:07 我的小叮当 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://leetcode.com/problems/majority element/" Level: Easy Discription: Given an array of size n, find the majority element. The majority el 阅读全文
posted @ 2019-01-06 12:18 我的小叮当 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://www.nowcoder.com/practice/623a5ac0ea5b4e5f95552655361ae0a8?tpId=13&tqId=11203&tPage=3&rp=3&ru=/ta/coding interviews&qru=/ta/coding int 阅读全文
posted @ 2019-01-04 16:06 我的小叮当 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://leetcode.com/problems/array nesting/" Level: Medium Discription: A zero indexed array A of length N contains all integers from 0 to N 阅读全文
posted @ 2019-01-04 15:13 我的小叮当 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://leetcode.com/problems/fair candy swap/" Level: Easy Discription: Alice and Bob have candy bars of different sizes: A[i] is the size of 阅读全文
posted @ 2019-01-04 14:21 我的小叮当 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://www.nowcoder.com/practice/abc3fe2ce8e146608e868a70efebf62e?tpId=13&tqId=11154&tPage=1&rp=1&ru=/ta/coding interviews&qru=/ta/coding int 阅读全文
posted @ 2019-01-03 20:43 我的小叮当 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 题目 链接: "https://leetcode.com/problems/beautiful arrangement ii/" Level: Medium Discription: Given two integers n and k, you need to construct a list w 阅读全文
posted @ 2019-01-03 16:27 我的小叮当 阅读(222) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页