STL: bind1st, find_if
摘要:
还是Remove Duplicates from Sorted Array那道题,STL还有第二种方法(简直。。。)class Solution {public: int removeDuplicates(int A[], int n) { return removeDuplicates(A, A + n, A) - A; }templateOutIt removeDuplicates(InIt first, InIt last, OutIt output) { while (first != last) { *output++ = *first;... 阅读全文
posted @ 2014-03-30 10:59 parapax 阅读(346) 评论(0) 推荐(0) 编辑