{"id":371,"date":"2025-02-20T15:17:29","date_gmt":"2025-02-20T08:17:29","guid":{"rendered":"https:\/\/tikky.xyz\/blog\/?p=371"},"modified":"2025-05-23T11:19:05","modified_gmt":"2025-05-23T04:19:05","slug":"sorting-algorithm-%e0%b8%84%e0%b8%b7%e0%b8%ad%e0%b8%ad%e0%b8%b0%e0%b9%84%e0%b8%a3","status":"publish","type":"post","link":"https:\/\/tikky.xyz\/blog\/?p=371","title":{"rendered":"Sorting Algorithm \u0e04\u0e37\u0e2d\u0e2d\u0e30\u0e44\u0e23?"},"content":{"rendered":"\n<p><strong>Sorting Algorithm<\/strong> \u0e04\u0e37\u0e2d\u0e0a\u0e38\u0e14\u0e02\u0e2d\u0e07\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e43\u0e19\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e40\u0e23\u0e35\u0e22\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e43\u0e19\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14 \u0e40\u0e0a\u0e48\u0e19 \u0e08\u0e32\u0e01\u0e19\u0e49\u0e2d\u0e22\u0e44\u0e1b\u0e21\u0e32\u0e01 (ascending) \u0e2b\u0e23\u0e37\u0e2d\u0e08\u0e32\u0e01\u0e21\u0e32\u0e01\u0e44\u0e1b\u0e19\u0e49\u0e2d\u0e22 (descending) \u0e0b\u0e36\u0e48\u0e07\u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e33\u0e04\u0e31\u0e0d\u0e43\u0e19\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e23\u0e30\u0e40\u0e1a\u0e35\u0e22\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e2b\u0e49\u0e07\u0e48\u0e32\u0e22\u0e15\u0e48\u0e2d\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e41\u0e25\u0e30\u0e27\u0e34\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f <strong>\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e02\u0e2d\u0e07 Sorting Algorithm<\/strong><\/h3>\n\n\n\n<p>Sorting Algorithm \u0e21\u0e35\u0e2b\u0e25\u0e32\u0e22\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a \u0e42\u0e14\u0e22\u0e41\u0e15\u0e48\u0e25\u0e30\u0e41\u0e1a\u0e1a\u0e21\u0e35\u0e08\u0e38\u0e14\u0e40\u0e14\u0e48\u0e19\u0e41\u0e25\u0e30\u0e08\u0e38\u0e14\u0e14\u0e49\u0e2d\u0e22\u0e17\u0e35\u0e48\u0e40\u0e2b\u0e21\u0e32\u0e30\u0e01\u0e31\u0e1a\u0e2a\u0e16\u0e32\u0e19\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e17\u0e35\u0e48\u0e19\u0e34\u0e22\u0e21\u0e43\u0e0a\u0e49 \u0e44\u0e14\u0e49\u0e41\u0e01\u0e48:<\/p>\n\n\n\n<ol>\n<li><strong>Bubble Sort<\/strong> \u2013 \u0e08\u0e31\u0e14\u0e40\u0e23\u0e35\u0e22\u0e07\u0e42\u0e14\u0e22\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e23\u0e35\u0e22\u0e1a\u0e40\u0e17\u0e35\u0e22\u0e1a\u0e41\u0e25\u0e30\u0e2a\u0e25\u0e31\u0e1a\u0e04\u0e48\u0e32\u0e02\u0e49\u0e32\u0e07\u0e40\u0e04\u0e35\u0e22\u0e07\u0e01\u0e31\u0e19<\/li>\n\n\n\n<li><strong>Selection Sort<\/strong> \u2013 \u0e2b\u0e32\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e40\u0e25\u0e47\u0e01\u0e17\u0e35\u0e48\u0e2a\u0e38\u0e14\u0e41\u0e25\u0e49\u0e27\u0e2a\u0e25\u0e31\u0e1a\u0e44\u0e1b\u0e44\u0e27\u0e49\u0e14\u0e49\u0e32\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e25\u0e30\u0e23\u0e2d\u0e1a<\/li>\n\n\n\n<li><strong>Insertion Sort<\/strong> \u2013 \u0e41\u0e17\u0e23\u0e01\u0e04\u0e48\u0e32\u0e25\u0e07\u0e43\u0e19\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e17\u0e35\u0e48\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07<\/li>\n\n\n\n<li><strong>Merge Sort<\/strong> \u2013 \u0e41\u0e1a\u0e48\u0e07\u0e04\u0e23\u0e36\u0e48\u0e07\u0e41\u0e25\u0e30\u0e08\u0e31\u0e14\u0e40\u0e23\u0e35\u0e22\u0e07\u0e08\u0e32\u0e01\u0e2a\u0e48\u0e27\u0e19\u0e40\u0e25\u0e47\u0e01 \u0e46 \u0e41\u0e25\u0e49\u0e27\u0e23\u0e27\u0e21\u0e01\u0e25\u0e31\u0e1a<\/li>\n\n\n\n<li><strong>Quick Sort<\/strong> \u2013 \u0e40\u0e25\u0e37\u0e2d\u0e01\u0e04\u0e48\u0e32 pivot \u0e41\u0e25\u0e30\u0e41\u0e1a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1b\u0e47\u0e19\u0e2a\u0e2d\u0e07\u0e2a\u0e48\u0e27\u0e19\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e08\u0e31\u0e14\u0e40\u0e23\u0e35\u0e22\u0e07\u0e41\u0e22\u0e01\u0e01\u0e31\u0e19<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udfe2 <strong>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19\u0e42\u0e04\u0e49\u0e14\u0e14\u0e49\u0e27\u0e22 PHP<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Bubble Sort<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function bubbleSort($arr) {\n    $n = count($arr);\n    for ($i = 0; $i &lt; $n - 1; $i++) {\n        for ($j = 0; $j &lt; $n - $i - 1; $j++) {\n            if ($arr[$j] > $arr[$j + 1]) {\n                \/\/ \u0e2a\u0e25\u0e31\u0e1a\u0e04\u0e48\u0e32\n                $temp = $arr[$j];\n                $arr[$j] = $arr[$j + 1];\n                $arr[$j + 1] = $temp;\n            }\n        }\n    }\n    return $arr;\n}\n\n$array = [64, 34, 25, 12, 22, 11, 90];\necho \"Bubble Sort: \";\nprint_r(bubbleSort($array));\n<\/pre>\n\n\n\n<p><strong>2. Selection Sort<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function selectionSort($arr) {\n    $n = count($arr);\n    for ($i = 0; $i &lt; $n - 1; $i++) {\n        $minIndex = $i;\n        for ($j = $i + 1; $j &lt; $n; $j++) {\n            if ($arr[$j] &lt; $arr[$minIndex]) {\n                $minIndex = $j;\n            }\n        }\n        \/\/ \u0e2a\u0e25\u0e31\u0e1a\u0e04\u0e48\u0e32\n        $temp = $arr[$i];\n        $arr[$i] = $arr[$minIndex];\n        $arr[$minIndex] = $temp;\n    }\n    return $arr;\n}\n\necho \"Selection Sort: \";\nprint_r(selectionSort($array));\n<\/pre>\n\n\n\n<p><strong>3. Insertion Sort<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function insertionSort($arr) {\n    $n = count($arr);\n    for ($i = 1; $i &lt; $n; $i++) {\n        $key = $arr[$i];\n        $j = $i - 1;\n        \/\/ \u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e04\u0e48\u0e32\u0e17\u0e35\u0e48\u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32 key \u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32\n        while ($j >= 0 &amp;&amp; $arr[$j] > $key) {\n            $arr[$j + 1] = $arr[$j];\n            $j--;\n        }\n        $arr[$j + 1] = $key;\n    }\n    return $arr;\n}\n\necho \"Insertion Sort: \";\nprint_r(insertionSort($array));\n<\/pre>\n\n\n\n<p><strong>4. Merge Sort<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function mergeSort($arr) {\n    if (count($arr) &lt;= 1) {\n        return $arr;\n    }\n\n    $mid = floor(count($arr) \/ 2);\n    $left = array_slice($arr, 0, $mid);\n    $right = array_slice($arr, $mid);\n\n    return merge(mergeSort($left), mergeSort($right));\n}\n\nfunction merge($left, $right) {\n    $result = [];\n    while (count($left) > 0 &amp;&amp; count($right) > 0) {\n        if ($left[0] &lt;= $right[0]) {\n            $result[] = array_shift($left);\n        } else {\n            $result[] = array_shift($right);\n        }\n    }\n\n    return array_merge($result, $left, $right);\n}\n\necho \"Merge Sort: \";\nprint_r(mergeSort($array));\n<\/pre>\n\n\n\n<p><strong>5. Quick Sort<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">function quickSort($arr) {\n    if (count($arr) &lt; 2) {\n        return $arr;\n    }\n\n    $pivot = $arr[0];\n    $left = [];\n    $right = [];\n\n    for ($i = 1; $i &lt; count($arr); $i++) {\n        if ($arr[$i] &lt;= $pivot) {\n            $left[] = $arr[$i];\n        } else {\n            $right[] = $arr[$i];\n        }\n    }\n\n    return array_merge(quickSort($left), [$pivot], quickSort($right));\n}\n\necho \"Quick Sort: \";\nprint_r(quickSort($array));\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcca <strong>\u0e40\u0e1b\u0e23\u0e35\u0e22\u0e1a\u0e40\u0e17\u0e35\u0e22\u0e1a\u0e1b\u0e23\u0e30\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e20\u0e32\u0e1e (Time Complexity)<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Algorithm<\/th><th>Best Case<\/th><th>Average Case<\/th><th>Worst Case<\/th><th>Space Complexity<\/th><\/tr><\/thead><tbody><tr><td>Bubble Sort<\/td><td>O(n)<\/td><td>O(n\u00b2)<\/td><td>O(n\u00b2)<\/td><td>O(1)<\/td><\/tr><tr><td>Selection Sort<\/td><td>O(n\u00b2)<\/td><td>O(n\u00b2)<\/td><td>O(n\u00b2)<\/td><td>O(1)<\/td><\/tr><tr><td>Insertion Sort<\/td><td>O(n)<\/td><td>O(n\u00b2)<\/td><td>O(n\u00b2)<\/td><td>O(1)<\/td><\/tr><tr><td>Merge Sort<\/td><td>O(n log n)<\/td><td>O(n log n)<\/td><td>O(n log n)<\/td><td>O(n)<\/td><\/tr><tr><td>Quick Sort<\/td><td>O(n log n)<\/td><td>O(n log n)<\/td><td>O(n\u00b2)<\/td><td>O(log n)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcdd <strong>\u0e2a\u0e23\u0e38\u0e1b<\/strong><\/h3>\n\n\n\n<ul>\n<li><strong>Bubble Sort, Selection Sort, Insertion Sort<\/strong> \u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e0a\u0e38\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e19\u0e32\u0e14\u0e40\u0e25\u0e47\u0e01<\/li>\n\n\n\n<li><strong>Merge Sort, Quick Sort<\/strong> \u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e0a\u0e38\u0e14\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e02\u0e19\u0e32\u0e14\u0e43\u0e2b\u0e0d\u0e48\u0e41\u0e25\u0e30\u0e21\u0e35\u0e1b\u0e23\u0e30\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e20\u0e32\u0e1e\u0e2a\u0e39\u0e07\u0e01\u0e27\u0e48\u0e32<\/li>\n<\/ul>\n\n\n\n<p>\u0e2b\u0e32\u0e01\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e07\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e17\u0e35\u0e48\u0e40\u0e23\u0e47\u0e27\u0e41\u0e25\u0e30\u0e21\u0e35\u0e1b\u0e23\u0e30\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e20\u0e32\u0e1e \u0e41\u0e19\u0e30\u0e19\u0e33\u0e43\u0e2b\u0e49\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e43\u0e0a\u0e49 <strong>Merge Sort<\/strong> \u0e2b\u0e23\u0e37\u0e2d <strong>Quick Sort<\/strong> \ud83d\udc4d<\/p>\n\n\n\n<p>\u0e2a\u0e19\u0e43\u0e08\u0e43\u0e2b\u0e49\u0e0a\u0e48\u0e27\u0e22\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21\u0e2b\u0e23\u0e37\u0e2d\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e42\u0e04\u0e49\u0e14\u0e15\u0e31\u0e27\u0e44\u0e2b\u0e19\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21\u0e44\u0e2b\u0e21\u0e04\u0e23\u0e31\u0e1a? \ud83d\ude0a<\/p>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_371\" class=\"pvc_stats all  \" data-element-id=\"371\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/tikky.xyz\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Sorting Algorithm \u0e04\u0e37\u0e2d\u0e0a\u0e38\u0e14\u0e02\u0e2d\u0e07\u0e02\u0e31\u0e49\u0e19\u0e15\u0e2d\u0e19\u0e43\u0e19\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e40\u0e23\u0e35\u0e22\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e43\u0e19\u0e25\u0e33\u0e14\u0e31\u0e1a\u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14 \u0e40\u0e0a\u0e48\u0e19 \u0e08\u0e32\u0e01\u0e19\u0e49\u0e2d\u0e22\u0e44\u0e1b\u0e21\u0e32\u0e01 (ascending) \u0e2b\u0e23\u0e37\u0e2d\u0e08\u0e32\u0e01\u0e21\u0e32\u0e01\u0e44\u0e1b\u0e19\u0e49\u0e2d\u0e22 (descending) \u0e0b\u0e36\u0e48\u0e07\u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e2a\u0e33\u0e04\u0e31\u0e0d\u0e43\u0e19\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e23\u0e30\u0e40\u0e1a\u0e35\u0e22\u0e1a\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e2b\u0e49\u0e07\u0e48\u0e32\u0e22\u0e15\u0e48\u0e2d\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32\u0e41\u0e25\u0e30\u0e27\u0e34\u0e40\u0e04\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25 \u2699\ufe0f \u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e02\u0e2d\u0e07 Sorting Algorithm Sorting Algorithm \u0e21\u0e35\u0e2b\u0e25\u0e32\u0e22\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a \u0e42\u0e14\u0e22\u0e41\u0e15\u0e48\u0e25\u0e30\u0e41\u0e1a\u0e1a\u0e21\u0e35\u0e08\u0e38\u0e14\u0e40\u0e14\u0e48\u0e19\u0e41\u0e25\u0e30\u0e08\u0e38\u0e14\u0e14\u0e49\u0e2d\u0e22\u0e17\u0e35\u0e48\u0e40\u0e2b\u0e21\u0e32\u0e30\u0e01\u0e31\u0e1a\u0e2a\u0e16\u0e32\u0e19\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e17\u0e35\u0e48\u0e19\u0e34\u0e22\u0e21\u0e43\u0e0a\u0e49 \u0e44\u0e14\u0e49\u0e41\u0e01\u0e48: \ud83d\udfe2 \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19\u0e42\u0e04\u0e49\u0e14\u0e14\u0e49\u0e27\u0e22 PHP 1. Bubble Sort 2. Selection Sort 3. Insertion Sort 4. Merge Sort 5. Quick Sort \ud83d\udcca \u0e40\u0e1b\u0e23\u0e35\u0e22\u0e1a\u0e40\u0e17\u0e35\u0e22\u0e1a\u0e1b\u0e23\u0e30\u0e2a\u0e34\u0e17\u0e18\u0e34\u0e20\u0e32\u0e1e (Time Complexity) Algorithm Best Case Average Case Worst Case Space Complexity Bubble Sort O(n) O(n\u00b2) [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_371\" class=\"pvc_stats all  \" data-element-id=\"371\" style=\"\"><i class=\"pvc-stats-icon small\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/tikky.xyz\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":372,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,22,11],"tags":[],"_links":{"self":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/371"}],"collection":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=371"}],"version-history":[{"count":1,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/371\/revisions"}],"predecessor-version":[{"id":373,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/posts\/371\/revisions\/373"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=\/wp\/v2\/media\/372"}],"wp:attachment":[{"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tikky.xyz\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}