From ca03d8ba902a193661193818ef6bafb1b8dd2734 Mon Sep 17 00:00:00 2001 From: Mustafa Siddiqui Date: Mon, 25 Mar 2019 02:12:22 +0530 Subject: [PATCH] psuedo code uploaded --- .DS_Store | Bin 0 -> 6148 bytes src/.DS_Store | Bin 0 -> 6148 bytes src/lab/.DS_Store | Bin 0 -> 8196 bytes src/lab/exp3/quick_pscode.txt | 31 +++++++++++++++++++++++++++++-- 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 src/.DS_Store create mode 100644 src/lab/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..470aa0e46726a0fd39ca93bb0b838d1777988465 GIT binary patch literal 6148 zcmeHKO>Wab6n@hLI&p=_0;yfj28l(eQUY{=kW5GyT_7QhU;(JL6VqC_p2&6x5Q4nn z4!{jK3Mb$o900!gX+@l}LP98-C%yTeXWsX$`J9=_5E1K7Mmt1pBI0m`O%KgErpA>o z*_!Q9gG|?mDW{i|P)hMqw(D>TI0gPU1=QO0Xh4#N^a`u?Z2j)1au}sD!noQT?!d48 z)P{&?18Y11C#H-FwA-kV(@~A}wZ`)35$(}Eyzc>Un@V~^#>g*f z*&l1!4P@sutY!T;KP#FRV>`!h(KtEx?#rwUlPu0PIT^)BdHyuXMsnJhlWbJzI)NGByv17w z?XB6Y*S*ydz21#^N6dD2yB%?}cY8i>@y)9{clQrZ-oBf?pMUs_slXUETy2*vp28Od zR)p69@~(TGinSDqw#?d}9UY=BDHna0>jL z0&0H{aD~3b%Anpl(C8}wu!(MMh}GW(#Ss>LiIjz*aRVRKx&V^AaTecB|r}d$x6$iHzXrC0BUVwh=t>=Vuy%^AYb?h z_yazLFW__F&F)Z<1a1{l(T+6xW@l%{+P9Y1LquvcAMX+Mh)6>j8yyUP5MF29l7@KN zK*cr8t0XrGW?at8Wnh5Mu1Pt?lpN)2=l1|Bw|`i%8fEL|M;ZXTGTinAh}+2m}T zBIL!htQecc$jpmzY3oF8LFiYADjLd%WVPaCnAdhrZ+20Q~7&47Fk^|gyG?CW_3JOh`W0scM&P{vTO zc4$8x7;FmwY{6{>w*C1B2J8Tag0(|Yx15PdE=qZd9yuYE&mt~qDM*z#Ae95R(j?n9V!KK6fx;~p{sVu3 zf5x330B^<)cwKLWR0&n8E!pGl&Kr;4&UiCh0A_pI+W=Ysn(QK1Zg7Y+xi9@pTXI+K zQySudFPNZ@F2IWPF)@%BxRMOW`H-=TY&$u( zQjZP}S^`iucv&0gtOFF2IoWn{ZlywL(^e10L5(XhjD_=lChC-JC+AjLIE;nExRs5o zP>illT&C(UZ7b857)T79Wk728yEs6}UR3J$5wCRdiS>MmBRs?q#~AJwgKno7bcm8f zd&&Obmp0CTb-cm=Q;hfpAZO38MXP<{Oa9%Xm1BMxI6)EE`5xF=3+()p6>~4Ja+53O zIOIO2^kP!Cy7?O5mWdm1?^Al3)AI?&Re#OT0MVe{j0|m5^&tED=JB)8dsNj^&trOz z13mFHs`q(sR2GBsi1+1yT&(jXz>D88{L`wQJXh0<`28%<qta*T$Y>@*~Uj+ z*L;$=oYk$SZ26emF$~de?SLEM&_^#<(2*>bXs#eu6(Qg7J?2rDw)&ixwH73jdg zPU(@@?rVgMYi$UVzKu1-*yzf!zc|Y{lk?()cIw#mt*qlc*&Ojq%yoBL^rlB&9!jh(%nZF(s`9b-*u?Tq~+ uyEM_8Td5EZT8>j{IZpZKABLP~R259y$+?xh!uH=k1f=)B@}7pP&A@MH5yi3q literal 0 HcmV?d00001 diff --git a/src/lab/exp3/quick_pscode.txt b/src/lab/exp3/quick_pscode.txt index d76fcce..55267c9 100644 --- a/src/lab/exp3/quick_pscode.txt +++ b/src/lab/exp3/quick_pscode.txt @@ -1,2 +1,29 @@ -quick sort - +Quick Sort- pseudo code + + +Quicksort(A,p,r) { + if (p < r) { + q <- Partition(A,p,r) + Quicksort(A,p,q) + Quicksort(A,q+1,r) + } +} + + + +Partition(A,p,r) + x <- A[p] + i <- p-1 + j <- r+1 + while (True) { + repeat + j <- j-1 + until (A[j] <= x) + repeat + i <- i+1 + until (A[i] >= x) + if (i A[j] + else + return(j) + } +}