一.unique函数 类属性算法unique的作用是从输入序列中"删除"全部相邻的反复元素. 该算法删除相邻的反复元素.然后又一次排列输入范围内的元素,而且返回一个迭代器(容器的长度没变,仅仅是元素顺序改变了),表示无反复的值范围得结束. // sort words alphabetically so we can find the duplicates sort(words.begin(), words.end()); /* eliminate duplicate words: *…
//maximum and minimum 暴力遍历 O(n) //i-th element dicide and conquer random_selected_partition k(all the element samller than value[k] put left of value[k],all tht elenment larger than value[k] put right) recurrence test if(i=k)return value[k] i…