Hackpads are smart collaborative documents. Join Hackpad Now.
2723 days ago
Unfiled. Edited by 嚼嚼 2723 days ago
快速排序
  • using namespace std;
  • int qq(int a[],int s,int f){
  • int l=s,r=f,t[f];
  • for(int i=s+1;i<=f;i++){
  •     if(a[i]<a[s]){
  •             t[l]=a[i];
  •             l+=1;
  •     }
2730 days ago
Unfiled. Edited by 陳靖 2730 days ago
  • using namespace std;
  •  
  • int l,m,n;
  • int binarysearch(int arr[], int number) {
  •     int first=0;
  •     int last=n-1;
  •     while(first<=last) {        //不用遞迴,用迴圈,也很好
2737 days ago
Unfiled. Edited by 百千.IO 2737 days ago
bubble_sort.cpp
  • using namespace std;
  • int main()
  • {
  •     //鍵盤輸入N個數
  •     int n;
  •     cin>>n;
  •     int arr[n];
  •     for(int i=0; i<n; i++)

Stop sharing the collection with ?

This pad is open to "", so will still be able to access it.
Cancel
Feed

Contact Support



Please check out our How-to Guide and FAQ first to see if your question is already answered! :)

If you have a feature request, please add it to this pad. Thanks!


Log in / Sign up