⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 select.h

📁 对链表进行排序 应用了多种排序方法 对其进行比较 有自己的详细的时间函数
💻 H
字号:
#include"Node.h"
using namespace std;

pNode SelectLinkListSort(pNode head)
{       pNode tmp = head->next;
       for (;tmp->next != NULL;tmp = tmp->next)
       {
              int min = tmp->data;
              pNode n = tmp;
              for (pNode node = tmp->next; node != NULL; node = node->next)
              {
                     if (node->data <=min)
                     {
                            n = node;
                            min = node->data;
                     }
              }
              //交换信息
              int t = tmp->data;
              tmp->data = n->data;
              n->data = t;
       }
       return head;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -