[面試]BUPT面試算法題目

看到了別人上傳的一份BUPT的面試算法題目。 2、求解一個數組的中位數。 分析:sort時間複雜度 O ( n l o g n ) O(nlogn) O(nlogn),排序,輸出中間的數。 #include<bits/stdc++.h> #define maxn 100010 using namespace std; typedef long long ll; ll n,a[maxn]; int
相關文章
相關標籤/搜索