From 6561cd67fa3c4a59a8e791c5bd613ea702a0d0d4 Mon Sep 17 00:00:00 2001 From: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> Date: Sat, 13 Jan 2024 16:09:17 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=BF=AB=E9=80=9F=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bala <13452927+rfgsdhshgfh@user.noreply.gitee.com> --- ...2\345\272\217\347\256\227\346\263\225.cpp" | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 "2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\277\253\351\200\237\346\216\222\345\272\217\347\256\227\346\263\225.cpp" diff --git "a/2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\277\253\351\200\237\346\216\222\345\272\217\347\256\227\346\263\225.cpp" "b/2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\277\253\351\200\237\346\216\222\345\272\217\347\256\227\346\263\225.cpp" new file mode 100644 index 00000000..ce4596e6 --- /dev/null +++ "b/2224020152/\347\254\254\345\215\201\345\215\225\345\205\203/\345\256\236\347\216\260\345\277\253\351\200\237\346\216\222\345\272\217\347\256\227\346\263\225.cpp" @@ -0,0 +1,33 @@ +#include +#include +#include + +int partion(char *s,int start,int end) +{ + + int key = s[start]; + int temp; + while(1) + { + while(s[start] < key && (start < end) ) + { + + start++; + } + + while(s[end] > key && (end > start)) + { + + end--; + } + if(start >= end) + { + + break; + } + else + { + + temp = s[start]; + s[start] = s[end]; + s[end] = t \ No newline at end of file -- Gitee