<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Bài tập về nhà nhóm 8 : Bài 1 by Đỗ Tấn Từ</title>
      <link>https://padlet.com/DoTanTu_2002/Bookmarks</link>
      <description> Bài 1: thuật toán Quick Sort(Sắp xếp nhanh).</description>
      <language>en-us</language>
      <pubDate>2020-12-23 13:02:15 UTC</pubDate>
      <lastBuildDate>2026-01-17 08:35:02 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f3eb.png</url>
      </image>
      <item>
         <title>Hồ Lê Minh Hoàng: 2050531200145</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982818184</link>
         <description><![CDATA[<div>Thuật toán sẽ có hai quá trình. Giai đoạn đầu là phân đoạn mảng ( partition ( ) ) và tiến trình sau là sắp xếp ( quickSort ( ) ) .<br><br></div><ul><li>Chọn pivot cho mảng.</li><li>Tạo hai biến là left và right để trỏ đến bên trái và bên phải của danh sách.</li><li>Tiến hành so sánh các phần tử với pivot. Trong trường hợp phần tử nhỏ hơn pivot thì dịch chuyển qua bên trái và ngược lại.</li><li>Sau khi đã dịch chuyển thì tiến hành công việc sắp xếp các phần tử trong mảng con mới, trước khi tiếp tục phân đoạn tiếp theo.</li></ul>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-10 01:12:00 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982818184</guid>
      </item>
      <item>
         <title>CÙNG NHAU PHÂN TÍCH VỀ SẮP XẾP NHANH(Quick Sort)</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982828265</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/925819596/831352ebfa586cada144d6b7d9406087/image.png" />
         <pubDate>2022-01-10 01:20:10 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982828265</guid>
      </item>
      <item>
         <title>Trần Đăng Hào :205141100106</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982829128</link>
         <description><![CDATA[<div><br><br><strong><mark>Dãy số ban đầu: <br></mark></strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4</div><div><strong><mark>Quá trình sắp xếp:</mark></strong></div><div><br></div><pre>i = -1;  j = 0;  pivot = 4</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4</div><pre>i = -1;  j = 1;  pivot = 4</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4</div><pre>i = -1;  j = 2;  pivot = 4</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4</div><pre>i = 0;  j = 3;  pivot = 4</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4</div><pre>i = 1;  j = 4;  pivot = 4</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4</div><pre>i = 1;  j = 5;  pivot = 4</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4<br><br></div><div>// hết vòng lặp&nbsp;</div><div>// hoán vị (Hoán vị trị pivot cho vị trí I + 1):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7<br>// Mảng bên Trái:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1</div><pre>i = -1;  j = 0;  pivot = 1</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1</div><div>// hết vòng lặp<br>// hoán vị (Hoán vị trị pivot cho vị trí I + 1):</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3</div><div>// Mảng bên phải:<br><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7</div><pre>i = 0;  j = 0;  pivot = 7</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7</div><pre>i = 0;  j = 1;  pivot = 7</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7</div><pre>i = 1;  j = 2;  pivot = 7</pre><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7</div><pre>i = 1;  j = 3;  pivot = 7</pre><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7<br><br></div><div>// hết vòng lặp<br>// hoán vị (Hoán vị trị pivot cho vị trí I + 1):<br><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10</div><div><mark>&nbsp;Kết quả :<br></mark><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/925819596/fbce22cf89dedf1284c6a96d4923c287/Sorting_quicksort_anim.gif" />
         <pubDate>2022-01-10 01:20:56 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982829128</guid>
      </item>
      <item>
         <title>Nguyễn Việt Long: 2050531200223</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982833152</link>
         <description><![CDATA[<div><br>#include&lt;stdio.h&gt;</div><div>void nhap(int a[], int n){</div><div>&nbsp; &nbsp; int i;</div><div>&nbsp; &nbsp; for(i=1; i&lt;=n; i++){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; printf("Nhap a[%d]: ",i);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; scanf("%d", &amp;a[i]);</div><div>&nbsp; &nbsp; }</div><div>}</div><div>void hoanvi(int &amp;a, int &amp;b)</div><div>{</div><div>&nbsp; &nbsp; int tg;</div><div>&nbsp; &nbsp; tg = a;</div><div>&nbsp; &nbsp; a = b;</div><div>&nbsp; &nbsp; b = tg;</div><div>}</div><div>&nbsp;</div><div>int Khoa(int a[], int left, int right)&nbsp;</div><div>{</div><div>&nbsp; &nbsp; int khoa = a[right];</div><div>&nbsp; &nbsp; int l = left;</div><div>&nbsp; &nbsp; int r = right - 1;</div><div>&nbsp; &nbsp; while(true){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; while(l &lt;= r &amp;&amp; a[l] &lt; khoa)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; l++;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; while(r &gt;= l &amp;&amp; a[r] &gt;= khoa)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; r--;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (l &gt;= r) break;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; hoanvi(a[l], a[r]);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; l++;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; r--;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; hoanvi(a[right], a[l]);</div><div>&nbsp; &nbsp; return l;</div><div>}</div><div>&nbsp;</div><div>void sapxep(int a[], int left, int right)</div><div>{</div><div>&nbsp; &nbsp; if (left &lt; right)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; int p = &nbsp; Khoa(a, left, right);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; sapxep(a, left, p - 1);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; sapxep(a, p + 1, right);</div><div>&nbsp; &nbsp; }</div><div>}</div><div>void xuat(int a[], int n)</div><div>{</div><div>&nbsp; &nbsp; int i;</div><div>&nbsp; &nbsp; for (i=1; i &lt;= n; i++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; printf("%d ", a[i]);</div><div>&nbsp; &nbsp; printf("\n");</div><div>}</div><div>main()</div><div>{</div><div>&nbsp; &nbsp; int a[100];</div><div>&nbsp; &nbsp; int n;</div><div>&nbsp; &nbsp; printf("Nhap so luong phan tu mang: ");</div><div>&nbsp; &nbsp; scanf("%d", &amp;n);</div><div>&nbsp; &nbsp; nhap(a, n);</div><div>&nbsp; &nbsp; sapxep(a, 1, n);</div><div>&nbsp; &nbsp; printf("Day so sau khi sap xep la : ");</div><div>&nbsp; &nbsp; xuat(a, n);</div><div>&nbsp; &nbsp; return 0;</div><div>}</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/925819596/ff0f6d0a1230ac4e71e50abfdfe859e4/image.png" />
         <pubDate>2022-01-10 01:24:23 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1982833152</guid>
      </item>
      <item>
         <title>Giới thiệu về thuật toán sắp xếp nhanh-Quick Sort (Đỗ Tấn Từ: 2050531200324 )</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983228802</link>
         <description><![CDATA[<ul><li><em><mark>Thuật toán sắp xếp nhanh hay còn gọi là QuickSort Algorithm là một trong </mark></em><a href="https://duongdinh24.com/tag/thuat-toan-sap-xep/"><em><mark>6 thuật toán sắp xếp thông dụng</mark></em></a><em><mark> nhất của khoa học máy tính. Thuật toán sử dụng tư tưởng chia để trị nên còn được ví là part sort và thuộc loại sắp xếp phức tạp. Từ dãy ban đầu, người ta sẽ chia dãy thành hai phần nhỏ theo một quy tắc xác định, từ đó giúp cải thiện tốc độ của việc săp xếp.</mark></em></li><li>Có 3 cách chọn pivot (phần tử làm chốt), mục đích là để chọn được phần tử có giá trị trung gian để chia làm hai vế cho danh sách.<ol><li>Chọn phần tử đầu mảng hoặc phần tử cuối làm chốt</li><li>Chọn phần tử ở giữa mảng</li><li>Chọn phần tử trung vị trong ba phần tử đứng đầu, đứng giữa và đứng cuối làm phần tử chốt.</li><li>Chọn phần tử ngẫu nhiên làm phần tử chốt. Tuy nhiên cách này rất dễ dẫn đến khả năng rơi vào các trường hợp đặc biệt.</li></ol></li><li><strong>Trong bài này nhóm em lựa chọn pivot ở cuối mảng để sắp xếp</strong></li></ul>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-10 07:10:08 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983228802</guid>
      </item>
      <item>
         <title>Mô Tả Thuật Toán</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983751769</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2022-01-10 13:13:52 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983751769</guid>
      </item>
      <item>
         <title>Minh Họa Thuật Toán</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983752712</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2022-01-10 13:14:26 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983752712</guid>
      </item>
      <item>
         <title>Cài Đặt Thuật Toán</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983753502</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2022-01-10 13:14:51 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1983753502</guid>
      </item>
      <item>
         <title>Cảm ơn cô đã xem bài tập 1 của nhóm 8. Mong cô để lại các ý kiến, để nhóm em có thể bổ sung và hoàn thiện phần làm bài của nhóm mình </title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985200186</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://media0.giphy.com/media/MXQmDs1c8oAOVkIYHz/giphy.gif" />
         <pubDate>2022-01-11 03:45:12 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985200186</guid>
      </item>
      <item>
         <title>So sánh Quick Sort và Merge Sort</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985223074</link>
         <description><![CDATA[<div>Quick Sort là một thuật toán sắp xếp tại chỗ trong khi Merge Sort phải sử dụng thêm không gian. Sắp xếp tại chỗ có nghĩa là không có dung lượng lưu trữ bổ sung nào được sử dụng để thực hiện sắp xếp (ngoại trừ ngăn xếp đệ quy). Merge Sort yêu cầu một mảng tạm thời để hợp nhất các mảng đã sắp xếp, vì vậy Quick Sort trở thành tùy chọn tốt hơn.<br><br></div><div><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-11 04:03:48 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985223074</guid>
      </item>
      <item>
         <title>Thành Viên: Gồm 4 thành viên</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985408784</link>
         <description><![CDATA[<div>1. &nbsp; Trần Đăng Hào<br>2. &nbsp; Đỗ Tấn Từ<br>3. &nbsp; Hồ Lê Minh Hoàng<br>4.&nbsp; &nbsp; Nguyễn Việt Long<br>--&gt;&gt; Nhóm trưởng: Đỗ Tấn Từ</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-11 06:51:26 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985408784</guid>
      </item>
      <item>
         <title>Nhiệm vụ của từng thành viên</title>
         <author>DoTanTu_2002</author>
         <link>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985411738</link>
         <description><![CDATA[<div>+ <strong>Đỗ Tấn Từ</strong>: Tìm hiểu và phân tích&nbsp; sơ lược về Quick Sort<br>+ <strong>Hồ Lê Minh Hoàng</strong>: Mô tả cách hoạt động của thuật toán <br>+ <strong>Trần Đăng Hào</strong>: Minh họa rõ hơn về cách duyệt mảng và sắp xếp<br>+ <strong>Nguyễn Việt Long</strong>: Cài đặt thuật toán và in ra màn hình kết quả&nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-01-11 06:53:57 UTC</pubDate>
         <guid>https://padlet.com/DoTanTu_2002/Bookmarks/wish/1985411738</guid>
      </item>
   </channel>
</rss>
