<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Nhóm 4 : Cấu trúc dữ liệu &amp; giải thuật by Lê Thế Phú</title>
      <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m</link>
      <description>Được tạo với một khả năng cảm nhận tinh tế</description>
      <language>en-us</language>
      <pubDate>2021-12-04 11:26:58 UTC</pubDate>
      <lastBuildDate>2025-11-09 07:00:11 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title></title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2423909049</link>
         <description><![CDATA[<div>- Đặng Thị Mỹ Hoà<br>&nbsp; + STT - 10<br>- Hoàng Chung Nghĩa<br>&nbsp; + STT - 24<br>- Lê Thế Phú<br>&nbsp; + STT - 41<br>- Trần Hoàng Anh<br>&nbsp; + STT - 63</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-18 07:58:49 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2423909049</guid>
      </item>
      <item>
         <title>Input - Output</title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2423974067</link>
         <description><![CDATA[<div>Input : Chuỗi kí tự (chuoi[])&nbsp;<br><br></div><div>Output : Chuỗi đã được mã hoá  &nbsp;<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-18 11:41:03 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2423974067</guid>
      </item>
      <item>
         <title>Mô tả Thuật Toán</title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424007249</link>
         <description><![CDATA[<div><br>&nbsp;1.Chọn ký tự đầu tiên từ chuỗi nguồn.<br><br></div><div>2. Nối ký tự đã chọn vào chuỗi đích.<br><br></div><div>3. Đếm số lần xuất hiện tiếp theo của ký tự được chọn và thêm số đếm vào chuỗi đích.<br><br></div><div>4.Chọn ký tự tiếp theo và lặp lại các bước 2, 3 và 4 nếu KHÔNG đến cuối chuỗi<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-18 13:06:23 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424007249</guid>
      </item>
      <item>
         <title>Minh hoạ thuật toán</title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424008745</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1435586182/8052cc08475e79f92e8500e032dcba5e/image.png" />
         <pubDate>2022-12-18 13:10:01 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424008745</guid>
      </item>
      <item>
         <title>Cài đặt thuật toán</title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424008984</link>
         <description><![CDATA[<div>#include&lt;stdio.h&gt;<br>#include&lt;stdlib.h&gt;<br>#include&lt;string.h&gt;<br>char *mahoa(char *a){<br>	int i=0,dem,j=0,k;<br>	char *tg = new char[2*strlen(a)+1];<br>	char demdodai[100];<br>	<br>	while(i &lt; strlen(a)){<br>		tg[j]= a[i];<br>		j++;<br>		dem=1;<br>		while(i+1&lt;strlen(a) &amp;&amp; a[i]==a[i+1]){<br>			dem++;<br>			i++;<br>		}<br>		sprintf(demdodai, "%d", dem); //dung de tao chuoi tu cac kieu du lieu nguyen thuy nhu float,int,double<br>		k = 0;<br>		while(demdodai[k] != '\0') {<br>			tg[j] = demdodai[k];<br>			++j;<br>			++k;<br>		}<br>		i++;<br>	}<br>	tg[j] = '\0';<br>	return tg;<br>}<br>main()<br>{<br>	char chuoi[100];<br>	puts("Nhap chuoi ");<br>	gets(chuoi);<br>	char *dich = mahoa(chuoi);<br>	puts("\tChuoi Dich: ");<br>	printf("\t%s", dich);<br>	<br>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-18 13:10:33 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424008984</guid>
      </item>
      <item>
         <title>Input - Output: </title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424010680</link>
         <description><![CDATA[<div>Input: Dãy số (a), số phần tử (n)<br>Output: Dãy số tăng dần</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-18 13:14:11 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424010680</guid>
      </item>
      <item>
         <title>Mô tả thuật toán</title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424010882</link>
         <description><![CDATA[<div>1. &nbsp; Một mảng được chia thành các mảng con bằng cách chọn một phần tử trục ( thường thì người ta phần tử đầu tiên,phần tử cuối cùng hoặc phần tử trung tâm làm phần tử trục).<br><br></div><div>2. &nbsp; Trong khi chia mảng, phần tử trục phải được định vị sao cho các phần tử nhỏ hơn trục được giữ ở phía bên trái và các phần tử lớn hơn trục nằm ở phía bên phải của trục<br><br></div><div>3. &nbsp; Các mảng con bên trái và bên phải cũng được chia theo cách tiếp cận tương tự. Quá trình này tiếp tục cho đến khi mỗi mảng con chứa một phần tử duy nhất(Đệ Quy)<br><br></div><div>4. &nbsp; Tại thời điểm này, các yếu tố đã được sắp xếp. Cuối cùng, các phần tử được kết hợp để tạo thành một mảng được sắp xếp<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-18 13:14:38 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424010882</guid>
      </item>
      <item>
         <title>Minh hoạ thuật toán</title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424011471</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1435586182/71bc49a22f7a07ad5f1384a583f39c69/image.png" />
         <pubDate>2022-12-18 13:16:01 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424011471</guid>
      </item>
      <item>
         <title>Cài đặt thuật toán</title>
         <author>LeThePhu</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424011788</link>
         <description><![CDATA[<div>#include&lt;stdio.h&gt;<br>#include&lt;stdlib.h&gt;<br>int n;<br>//Sap xep&nbsp;<br>void NhapMang(int arr[], int n){<br>	for(int i =1 ; i&lt;=n ;i++){<br>		printf("Nhap so thu %d : ",i);<br>		scanf("%d",&amp;arr[i]);<br>	}<br>}<br><br>void Xuatmang(int arr[], int n){<br>	for(int i = 1; i&lt;= n; i++)<br>		printf("%d ",arr[i]);<br>}<br><br>void Doicho(int &amp;a ,int &amp;b){<br>	int tg = a;<br>	a = b;<br>	b = tg;<br>}<br><br>//QuickSort<br>void Quicksort(int arr[], int l, int r){<br>	if(l &lt; r){<br>	int p = arr[(l+r)/2];<br>	int i = l ,j = r;<br>	while(i &lt;= j ){<br>		while(arr[i] &lt; p )<br>			i++;<br>		while(arr[j] &gt; p )<br>			j--;<br>		if(i &lt;= j ){<br>			if(i &lt; j){<br>				Doicho(arr[i],arr[j]);<br>				Xuatmang(arr, n);	<br>				}<br>				i++;<br>				j--;<br>		}<br>	}<br>	Quicksort(arr,i,r);<br>	Quicksort(arr,l, j);<br>	}<br>}<br><br>main(){<br>	int dso[100];<br>	printf("\n4. Quick Sort\n");<br>	printf("Nhap bao nhieu phan tu: ");<br>	scanf("%d", &amp;n);<br>	NhapMang(dso,n);<br>	printf("Day so : \n");<br>	Xuatmang(dso, n);<br>	Quicksort(dso,1,n);<br>	printf("\nDay so sau khi sap xep Quicksort: \n");<br>	Xuatmang(dso, n);	<br>			<br>}<br><br>	<br><br><br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-18 13:16:35 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2424011788</guid>
      </item>
      <item>
         <title>Input - Output</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425580693</link>
         <description><![CDATA[<div><strong>Input:</strong> chuỗi cha (a), chuỗi cần tìm (b), mảng số (c), số phần tử (n)<br><br></div><div><strong>Output:</strong> mảng gồm các vị trí bắt đầu của chuỗi (b) trong (a)</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 08:33:17 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425580693</guid>
      </item>
      <item>
         <title>Mô tả thuật toán</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425583790</link>
         <description><![CDATA[<ul><li>Lần lượt xét từng chữ cái trong chuỗi (a) với chữ cái đầu tiên của chuỗi (b)</li><li>Khi phát hiện chữ cái trong chuỗi (a) trùng với chữ cái đầu tiên của chuỗi (b), ta bắt đầu <strong>tiến trình so sánh</strong>, lần lượt so sánh từng chữ cái tiếp theo của chuỗi (a) với từng chữ cái tiếp theo của chuỗi (b):<ul><li>Khi đang thực hiện <strong>tiến trình so sánh</strong>, lưu vị trí xuất hiện đầu tiên tiếp theo của chữ cái đầu (b) trong (a), gọi là ‘vị trí lưu’.</li><li>Nếu tất cả chữ cái trong (b) được phát hiện liên tiếp trong (a). lưu vị trí bắt đầu của chuỗi (b) trong (a) vào mảng (c) -&gt; thoát <strong>tiến trình so sánh</strong>, thực hiện '<strong>Tiếp tục'</strong></li><li>Nếu phát hiện chữ cái của (a) không trùng với chữ cái trong (b) -&gt; thoát <strong>tiến trình so sánh</strong>, thực hiện '<strong>Tiếp tục'</strong></li></ul></li></ul><div>'<strong>Tiếp tục'</strong>: nếu có ‘vị trí lưu’ thì quay lại xét các chữ cái trong (a) từ vị trí lưu. Nếu không thì tiếp tục xét từ chữ cái tiếp theo</div><ul><li>Thực hiện đến khi xét hết chữ cái trong chuỗi (a) thì dừng.</li></ul><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 08:38:01 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425583790</guid>
      </item>
      <item>
         <title>Minh họa thuật toán</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425583865</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1430293754/64ed99dcfc3425705bb1693a66336013/image.png" />
         <pubDate>2022-12-20 08:38:08 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425583865</guid>
      </item>
      <item>
         <title>Cài đặt thuật toán</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425583976</link>
         <description><![CDATA[<div>#include &lt;stdio.h&gt;<br>#include &lt;string.h&gt;<br>void search(char a[], char b[], int arr[], int *n)<br>{<br>	int i = 0, j = 0, jump = 0, saveJump = 0, reset = 0;<br>	int len_1 = strlen(a);<br>	int len_2 = strlen(b);<br>	while(i &lt; len_1)<br>	{<br>		if(j &gt; 0 &amp;&amp; saveJump == 0 &amp;&amp; a[i] == b[0])<br>		{<br>			jump = i;<br>			saveJump = 1;<br>		}<br>		if(a[i] == b[j]) j++;<br>		else if(j &gt; 0)<br>			reset = 1;<br>		if(j == len_2)<br>		{<br>			arr[*n] = i-len_2+1;<br>			(*n)++;<br>			reset = 1;<br>		}<br>		i++;<br>		if(i == len_1 || reset == 0) continue;<br>		reset = 0;<br>		j = 0;<br>		if(saveJump != 0)<br>		{<br>			i = jump;<br>			saveJump = 0;<br>			continue;<br>		}<br>	}<br>}<br>void print(int indexs[], int n)<br>{<br>	int i;<br>	printf("Vi tri: ");<br>	for(i = 0; i &lt; n; i++)<br>		printf("%d ", indexs[i]);<br>}<br>main()<br>{<br>	char a[255], b[255];<br>	int n = 0;<br>	int arr[100];<br>	fflush(stdin);<br>	printf("Nhap chuoi a: ");<br>	gets(a);<br>	printf("Nhap chuoi b: ");<br>	gets(b);<br>	search(a, b, arr, &amp;n);<br>	print(arr, n);<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 08:38:19 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425583976</guid>
      </item>
      <item>
         <title>I.	Input-Output:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425646667</link>
         <description><![CDATA[<div>-&nbsp; &nbsp; &nbsp; &nbsp; Input: Chuỗi kí tự văn bản, Chuỗi kí tự mẫu (có chứa các kí tự ‘*’ và ‘?’ trong đó ‘?’ đại diện cho 1 kí tự bất kì, ‘*’ đại diện cho chuỗi kí tự bất kỳ kể cả chuỗi rỗng).</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; Output: Chuỗi mẫu có khớp với chuỗi văn bản hay không.</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 10:14:40 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425646667</guid>
      </item>
      <item>
         <title>II.	 Mô tả thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425647316</link>
         <description><![CDATA[<div><strong><em>-&nbsp; &nbsp; &nbsp; &nbsp; Xét từng kí tự trong chuỗi mẫu:</em></strong></div><div><strong>Trường hợp 1: kí tự đang xét là ‘*’.</strong> Ở đây ta có hai trường hợp:</div><div><strong>a)</strong>&nbsp; &nbsp; Chúng ta có thể bỏ qua kí tự ‘*’ và xét kí tự tiếp theo trong chuỗi mẫu.</div><div><strong>b)</strong>&nbsp; &nbsp;Kí tự ‘*’ khớp với 1 hoặc nhiều ki tự trong chuỗi văn bản. Lúc này chúng ta xét kí tự tiếp theo trong chuỗi.</div><div><strong>Trường hợp 2: kí tự đang xét là ‘?’:</strong> chúng ta bỏ qua kí tự đang xét trong văn bản và xét tiếp kí tự tiếp theo trong chuỗi mẫu và văn bản.</div><div><strong>Trường hợp 3: kí tự đang xét không phải kí tự đại diện:</strong> nếu hai kí tự đang xét trong chuỗi mẫu và chuỗi văn bản không khớp thì chuỗi mẫu và chuỗi văn bản không khớp, nếu có thì xét tiếp kí tự tiếp theo trong mẫu và văn bản.</div><div><strong><em>-&nbsp; &nbsp; &nbsp; &nbsp; Chúng ta dùng một mảng hai chiều để giải:</em></strong></div><div>T[i][j] = 1 nếu và chỉ nếu i kí tự đầu tiên trong chuỗi văn bản khớp với j kí tự đầu tiên trong chuỗi mẫu.</div><div>Ngược lại T[i][j] = 0.</div><div>Với n là độ dài chuỗi văn bản, m là độ dài chuỗi mẫu.</div><div>+) Khởi tạo mảng hai chiều với T[i][j] = 0 (i chạy từ 0 đến n, j chạy từ 0 đến m)</div><div>+) Đầu tiên hai chuỗi rỗng thì luôn khớp nhau: T[0][0] = 1.</div><div>+) Tiếp theo đối sánh mẫu với chuỗi rỗng, ta chỉ xét các kí tự ‘*’ ở chuỗi rỗng (chỉ có ‘*’ mới khớp với chuỗi rỗng):&nbsp;</div><div>a.&nbsp; &nbsp; &nbsp;T[0][j] = 1 khi kí tự thứ j trong mẫu là ‘*’ và j – 1 kí tự đầu tiên trong mẫu khớp với chuỗi rỗng.</div><div>b.&nbsp; &nbsp; T[0][j] = 0 khi kí tự thứ j trong mẫu là ‘*’ và j – 1 kí tự đầu tiên trong mẫu không khớp với chuỗi rỗng.</div><div>=&gt; T[0][j] = T[0][j – 1] khi kí tự thứ j trong mẫu là ‘*’.</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +) Tiếp theo ta đối sánh lần lượt từng kí tự thứ i trong văn bản và thứ j trong mẫu:</div><div>·&nbsp; &nbsp; &nbsp; &nbsp;Hai trường hợp nảy sinh nếu kí tự thứ j trong chuỗi mẫu là ‘*’:&nbsp;</div><div>a.&nbsp; &nbsp; &nbsp;Kí tự ‘*’ khớp với chuỗi rỗng: bỏ qua kí tự j.</div><div>b.&nbsp; &nbsp; Kí tự ‘*’ khớp với i kí tự đầu tiên của chuỗi văn bản</div><div>T[i][j] = T[i][j - 1] || T[i - 1][j]</div><div>·&nbsp; &nbsp; &nbsp; &nbsp;Nếu kí tự thứ j trong mẫu đang xét là ‘?’ hoặc hai kí tự đang xét khớp nhau thì bỏ qua hai kí tự đó:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; T[i][j] = T[i – 1][j – 1]</div><div>·&nbsp; &nbsp; &nbsp; &nbsp;Nếu 2 kí tự đang xét không phải kí tự đại diện và không khớp nhau:</div><div>T[i][j] = 0</div><div>Kết quả: Nếu T[n][m] = 1 thì chuỗi văn bản khớp với chuỗi mẫu, ngược lại thì không.</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 10:15:44 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425647316</guid>
      </item>
      <item>
         <title>IV.	Cài đặt thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425647794</link>
         <description><![CDATA[<div>#include&lt;stdio.h&gt;</div><div>#include&lt;conio.h&gt;</div><div>#include&lt;string.h&gt;</div><div>&nbsp;</div><div>int isMatch(char pattern[], int m, char text[], int n){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Khi chuoi mau rong:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Neu chuoi van ban khong rong thi tra ve dung,&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // neu khong thi nguoc lai</div><div>&nbsp; &nbsp; if (m == 0)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; return (n == 0);&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; //Khai bao mang kiem tra:</div><div>&nbsp; &nbsp; int lookup[n + 1][m + 1];</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; //Khoi tao mang:</div><div>&nbsp; &nbsp; for(int i = 0; i &lt;= n; i++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int j = 0; j &lt;= m; j++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lookup[i][j] = 0;</div><div>&nbsp; &nbsp; lookup[0][0] = 1;//Hai chuoi rong thi khop nhau</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; //Chi co ki tu '*' khop voi chuoi rong:</div><div>&nbsp; &nbsp; for(int j = 1; j &lt;= m; j++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(pattern[j - 1] == '*')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lookup[0][j] = lookup[0][j - 1];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; //Thuc hien quy hoach dong de tinh tiep:</div><div>&nbsp; &nbsp; for(int i = 1; i &lt;= n; i++){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int j = 1; j &lt;= m; j++){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Hai truong hop neu la ki tu '*'</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // a) Bo qua ki tu '*' xet tiep&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; ki tu tiep theo cua chuoi mau,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; Tuc la '*' khop voi chuoi rong.</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // b) ki tu '*' khop voi i ki tu&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; dau tien trong chuoi van ban</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pattern[j - 1] == '*')</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lookup[i][j]</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = lookup[i][j - 1] || lookup[i - 1][j];</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Ki tu dang xet khop o 2 truong hop:</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // (a) ki tu o chuoi mau dang xet la '?'</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // (b) hai ki tu dang xet khop nhau</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (pattern[j - 1] == '?'</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|| text[i - 1] == pattern[j - 1])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lookup[i][j] = lookup[i - 1][j - 1];</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Neu 2 ki tu dang xet khong khop</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lookup[i][j] = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return lookup[n][m];&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>}</div><div>&nbsp;</div><div>&nbsp;</div><div>main(){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char sm[1000], sn[1000];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Nhap xau van ban: ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gets(sn);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Nhap xau mau: ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gets(sm);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(isMatch(sm, strlen(sm), sn, strlen(sn)))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Khop!");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Khong khop!");</div><div>}&nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 10:16:36 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425647794</guid>
      </item>
      <item>
         <title>III.	Minh họa thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425657483</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1436899128/1ee9f060c1ec5bf4ecdc4ecf68f6b52f/image.png" />
         <pubDate>2022-12-20 10:30:56 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425657483</guid>
      </item>
      <item>
         <title>Input - Output</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715679</link>
         <description><![CDATA[<div><strong>Input</strong>: dãy số (a), số phần tử (n)</div><div><strong>Output:</strong> dãy số tăng dần</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 12:00:21 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715679</guid>
      </item>
      <item>
         <title>Mô tả thuật toán</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715832</link>
         <description><![CDATA[<ul><li>Chọn phần tử chốt là phần tử cuối cùng của dãy.</li><li>Chọn phần tử trái lớn hơn phần tử chốt (duyệt từ đầu đến cuối danh sách, không tính phần tử chốt)</li><li>Chọn phần từ phải nhỏ hơn phần tử chốt (duyệt từ cuối đến đầu danh sách, không tính phần tử chốt)</li><li>Hoán vị phần tử trái và phần tử phải.</li><li>Tiếp tục cho đến khi vị trí của phần tử trái lớn hơn vị trí của phần tử phải thì dừng.</li><li>Sau khi dừng, hoán vị phần tử trái và phần tử chốt. Lúc này các phần tử nhỏ hơn chốt sẽ nằm bên trái, các phần tử lớn hơn chốt nằm bên phải. Trả về vị trí phần tử chốt.</li><li>Tiếp tục thực hiện các công việc trên với các mảng con được chia ra từ vị trí trả về.</li></ul>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 12:00:37 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715832</guid>
      </item>
      <item>
         <title>Minh họa thuật toán</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715918</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1430293754/069826d747fad85677efe15ba73c9c2c/image.png" />
         <pubDate>2022-12-20 12:00:47 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715918</guid>
      </item>
      <item>
         <title>Cài đặt thuật toán</title>
         <author>Nghia_Hoang</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715990</link>
         <description><![CDATA[<div>int partition(int arr[], int min, int max) {<br>	int pv = arr[max], left = min, right = max-1;<br>	while(true) {<br>		while(left &lt;= right &amp;&amp; arr[left] &lt; pv)<br>			left++;<br>		while(left &lt;= right &amp;&amp; arr[right] &gt;= pv)<br>			right--;<br>		if(left &gt; right)<br>			break;<br>		swap(&amp;arr[left], &amp;arr[right]);<br>		left++;<br>		right--;	<br>	}<br>	swap(&amp;arr[left], &amp;arr[max]);<br>	return left;<br>}<br>void quick_sort(int arr[], int min, int max) {<br>	if(min &lt; max) {<br>		int t = partition(arr, min, max);<br>		quick_sort(arr, min, t-1);<br>		quick_sort(arr, t+1, max);<br>	}<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 12:00:54 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425715990</guid>
      </item>
      <item>
         <title>Input - Output</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425769853</link>
         <description><![CDATA[<div><strong>Input:</strong> Dãy số (a), khóa(k)<br><strong>Output:</strong> Dãy số đã mã hóa</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 13:14:00 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425769853</guid>
      </item>
      <item>
         <title>Mô tả thuật toán</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425788349</link>
         <description><![CDATA[<div>- Ta có bảng ký tự 26 chữ cái A, B, C, …Z và các chữ số 0-9 được xếp thành một vòng tròn<br>- Sắp hai bảng chữ cái trên hai hàng song song với nhau<br>- Bảng chữ cái mật mã sẽ là bảng chữ cái thô đã được dịch sang trái hoặc sang phải một số vị trí.<br>- Đi từ đầu chuỗi đến cuối chuỗi:</div><ul><li>Nếu a[i] là chữ số:<ul><li>Nếu a[i] + k &gt; '9' trong bảng mã ASCII thì a[i] sẽ dịch sang phải a[i]+k-10 vị trí</li><li>Nếu a[i] + k &lt;= '9' trong bảng mã ASCII thì a[i] sẽ dịch sang phải a[i]+k vị trí</li></ul></li><li>Nếu a[i] là chữ cái thường:<ul><li>Nếu a[i] + k &gt; 'z' trong bảng mã ASCII thì a[i] sẽ dịch sang phải a[i]+k-26 vị trí</li><li>Nếu a[i] + k &lt;= 'z' trong bảng mã ASCII thì a[i] sẽ dịch sang phải a[i]+k vị trí</li></ul></li><li><br><ul><li>Nếu a[i] là chữ cái hoa:<ul><li>Nếu a[i] + k &gt; 'Z' trong bảng mã ASCII thì a[i] sẽ dịch sang phải a[i]+k-26 vị trí</li><li>Nếu a[i] + k &lt;= 'Z' trong bảng mã ASCII thì a[i] sẽ dịch sang phải a[i]+k vị trí</li></ul></li></ul></li></ul><div><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 13:34:44 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425788349</guid>
      </item>
      <item>
         <title>Minh họa thuật toán</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425819534</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1919793319/7afd1e0d97244ad783f7b751f68b38d9/image.png" />
         <pubDate>2022-12-20 14:09:06 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425819534</guid>
      </item>
      <item>
         <title>Cài đặt thuật toán</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425821927</link>
         <description><![CDATA[<div>#include &lt;stdio.h&gt;<br>#include &lt;string.h&gt;<br>int ktracThuong(char a)<br>{<br>	if ((a&gt;='a'&amp;&amp;a&lt;='z'))<br>		return 1;<br>	return 0;<br>}<br>int ktracHoa(char a)<br>{<br>	if ((a&gt;='A'&amp;&amp;a&lt;='Z'))<br>		return 1;<br>	return 0;<br>}<br>int ktraSo(char a)<br>{<br>	if (a&gt;='0'&amp;&amp;a&lt;='9')<br>			return 1;<br>	return 0;<br>}<br>char* maHoa(char mm[], int n)<br>{<br>	for (int i=0; i&lt;strlen(mm);i++)<br>		if(ktraSo(mm[i])==1)<br>			if ((mm[i]+n) &gt; '9')<br>				mm[i] = mm[i]+n-10;<br>			else<br>				mm[i]=mm[i]+n;<br>		else<br>			if(ktracThuong(mm[i])==1)<br>				if ((mm[i]+n) &gt; 'z')<br>					mm[i]=mm[i]+n-26;<br>				else<br>					mm[i]=mm[i]+n;<br>			else<br>				if(ktracHoa(mm[i])==1)<br>					if ((mm[i]+n) &gt; 'Z')<br>						mm[i]=mm[i]+n-26;<br>					else<br>						mm[i]=mm[i]+n;		<br>	return mm;<br>}<br>main()<br>{<br>	char matma[50];<br>	int n;<br>	printf("Nhap chuoi can ma hoa: ");<br>	gets(matma);<br>	printf("Nhap mat ma: ");<br>	scanf("%d", &amp;n);<br>	printf("Chuoi sau khi ma hoa la: %s", maHoa(matma, n));<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-20 14:11:31 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2425821927</guid>
      </item>
      <item>
         <title>I.	Input-Output:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426373744</link>
         <description><![CDATA[<div>-&nbsp; &nbsp; &nbsp; &nbsp; Input: Dãy số (a), số phần tử (n)</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; Output: dãy số tăng dần.</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-21 04:13:07 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426373744</guid>
      </item>
      <item>
         <title>II.	 Mô tả thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426373874</link>
         <description><![CDATA[<div>Ta coi các phần tử từ vị trí i = 1 đến [(n – 1) / 2] và từ j = [(n - 1) / 2] + 1 đến n đã được sắp xếp.</div><div>Lúc này ta dùng thuật toán trộn để trộn hai phần trên:</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; So sánh 2 khóa từ đầu dãy.</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; Chọn ra khóa nhỏ hơn đưa vào mảng tạm, sau khi chọn thì tăng biến vị trí của phần có khóa được chọn và mảng tạm lên 1.</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; Lần lượt làm cho đển khi một phần được chọn hết, đưa phần dư còn lại vào mảng tạm.</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; Sao chép mảng tạm vào dãy số.</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-21 04:13:25 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426373874</guid>
      </item>
      <item>
         <title>III.	Minh họa thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426374122</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1436899128/3486edc1f66405ca934c8d3873c673cb/image.png" />
         <pubDate>2022-12-21 04:13:58 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426374122</guid>
      </item>
      <item>
         <title>IV.	Cài đặt thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426374305</link>
         <description><![CDATA[<div>#include&lt;stdio.h&gt;</div><div>&nbsp;</div><div>void NhapMang(int arr[], int n){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int i =1 ; i&lt;=n ;i++){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Nhap so thu %d : ",i);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf("%d",&amp;arr[i]);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>}</div><div>&nbsp;</div><div>void XuatMang(int arr[], int n){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int i = 1; i&lt;= n; i++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("%d ",arr[i]);</div><div>}</div><div>&nbsp;</div><div>void MergeSort(int data[], int left, int right) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (right - left &lt; 1)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int mid = (left + right) / 2;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MergeSort(data, left, mid);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MergeSort(data, mid+1, right);</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int i = left, j = mid + 1;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int cur = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int a[right + 1];</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (i &lt;= mid || j &lt;= right)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i &gt; mid)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[cur++] = data[j++];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (j &gt; right)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[cur++] = data[i++];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (data[i] &lt; data[j])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[cur++] = data[i++];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a[cur++] = data[j++];</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; cur; i++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data[left + i] = a[i];</div><div>}</div><div>&nbsp;</div><div>main(){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int dso[1000], n;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Nhap bao nhieu phan tu: ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf("%d", &amp;n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NhapMang(dso, n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("\nDay so : ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XuatMang(dso, n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MergeSort(dso, 1, n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("\nDay so sau khi sap xep MergeSort: ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XuatMang(dso, n);&nbsp;<br><br></div><div>}&nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-21 04:14:21 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426374305</guid>
      </item>
      <item>
         <title>I.	Input-Output:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420278</link>
         <description><![CDATA[<div>-&nbsp; &nbsp; &nbsp; &nbsp; Input: Dãy số (a), số phần tử (n)</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; Output: dãy số tăng dần.</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-21 05:56:39 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420278</guid>
      </item>
      <item>
         <title>II.	 Mô tả thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420403</link>
         <description><![CDATA[<div>Ta chọn một phần tử làm chốt (để dễ dàng thì chọn phần tử đầu)</div><div>Chuyển những phần tử bé hơn phần tử chốt sang trái phần tử chốt, những phần tử còn lại sang phải.</div><div>Sắp xếp 2 mảng con bên trái và bên phải của phần tử chốt</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-21 05:56:58 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420403</guid>
      </item>
      <item>
         <title>III.	Minh họa thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420506</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1436899128/e8d7c61b06958bf37c57222e60a95c83/image.png" />
         <pubDate>2022-12-21 05:57:16 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420506</guid>
      </item>
      <item>
         <title>IV.	Cài đặt thuật toán:</title>
         <author>21115053120302</author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420645</link>
         <description><![CDATA[<div>#include&lt;stdio.h&gt;</div><div>&nbsp;</div><div>void NhapMang(int arr[], int n){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int i =1 ; i&lt;=n ;i++){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Nhap so thu %d : ",i);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf("%d",&amp;arr[i]);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>}</div><div>&nbsp;</div><div>void XuatMang(int arr[], int n){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(int i = 1; i&lt;= n; i++)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("%d ",arr[i]);</div><div>}</div><div>&nbsp;</div><div>void swap(int &amp;x, int &amp;y){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int tg = x;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x = y;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y = tg;</div><div>}</div><div>&nbsp;</div><div>void quickSort(int a[], int left, int right) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int i = left, j = right;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int prio = a[left];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (i &lt;= j) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (a[i] &lt; prio) ++i;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (a[j] &gt; prio) --j;</div><div>&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i &lt;= j) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; swap(a[i], a[j]);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ++i;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --j;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (left &lt; j) quickSort(a, left, j);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i &lt; right) quickSort(a, i, right);</div><div>}</div><div>&nbsp;</div><div>main(){</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int dso[1000], n;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("Nhap bao nhieu phan tu: ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scanf("%d", &amp;n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NhapMang(dso, n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("\nDay so : ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XuatMang(dso, n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quickSort(dso, 1, n);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf("\nDay so sau khi sap xep quickSort: ");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XuatMang(dso, n);</div><div>}&nbsp;</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-21 05:57:36 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2426420645</guid>
      </item>
      <item>
         <title>Input - Output</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299080</link>
         <description><![CDATA[<div>-&nbsp;Input: Dãy số (a), số phần tử (n)</div><div>-&nbsp;Output: Dãy số tăng dần</div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-22 07:57:59 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299080</guid>
      </item>
      <item>
         <title>Mô tả thuật toán</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299220</link>
         <description><![CDATA[<div>-&nbsp; &nbsp; &nbsp; &nbsp; Giải thuật sắp xếp nhanh chia mảng thành hai phần bằng cách so sánh từng phần tử của mảng với một phần tử được gọi là phần tử chốt. Một mảng bao gồm các phần tử nhỏ hơn hoặc bằng phần tử chốt và một mảng gồm các phần tử lớn hơn phần tử chốt.</div><div>-&nbsp; &nbsp; &nbsp; &nbsp; Quá trình phân chia này diễn ra cho đến khi độ dài của các mảng con đều bằng 1<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-22 07:58:17 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299220</guid>
      </item>
      <item>
         <title>Minh họa thuật toán</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299365</link>
         <description><![CDATA[]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1919793319/91817504bb2d9758039707a8ccf8fe4a/image.png" />
         <pubDate>2022-12-22 07:58:34 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299365</guid>
      </item>
      <item>
         <title>Cài đặt thuật toán</title>
         <author></author>
         <link>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299550</link>
         <description><![CDATA[<div>#include &lt;stdio.h&gt;</div><div>void NhapMang(int arr[],int n)<br><br></div><div>{<br><br></div><div>&nbsp; for(int i=1;i&lt;=n;i++)<br><br></div><div>&nbsp; {<br><br></div><div>&nbsp; printf("Nhap phan tu thu %d: ",i);<br><br></div><div>&nbsp; scanf("%d",&amp;arr[i]);&nbsp;<br><br></div><div>&nbsp; }&nbsp;<br><br></div><div>}&nbsp;<br><br></div><div>&nbsp;<br><br></div><div>void XuatMang(int arr[],int n)<br><br></div><div>{<br><br></div><div>&nbsp; for(int i=1;i&lt;=n;i++)&nbsp;<br><br></div><div>&nbsp; printf("&nbsp; %d&nbsp; ",arr[i]);<br><br></div><div>}&nbsp;<br><br></div><div>void HoanVi(int &amp;a,int &amp;b)<br><br></div><div>{<br><br></div><div>&nbsp; int tg=a;<br><br></div><div>&nbsp; a=b;<br><br></div><div>&nbsp; b=tg;&nbsp;<br><br></div><div>}<br><br></div><div>&nbsp;<br><br></div><div>void QuickSort(int a[], int tr, int ph)<br><br></div><div>{<br><br></div><div>&nbsp; if (tr&gt;=ph)<br><br></div><div>&nbsp; return;<br><br></div><div>&nbsp; int chot = a[(tr+ph)/2];<br><br></div><div>&nbsp; int i=tr;<br><br></div><div>&nbsp; int j=ph;<br><br></div><div>&nbsp; do<br><br></div><div>&nbsp; {<br><br></div><div>&nbsp; while(a[i]&lt;chot)<br><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;i++;<br><br></div><div>&nbsp; while(a[j]&gt;chot)<br><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;j--;<br><br></div><div>&nbsp; if (i&lt;=j)<br><br></div><div>&nbsp; {<br><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;HoanVi(a[i], a[j]);<br><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;i++;<br><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;j--;<br><br></div><div>&nbsp; }<br><br></div><div>&nbsp; }<br><br></div><div>&nbsp; while(i&lt;j);<br><br></div><div>&nbsp; QuickSort(a, tr, j);<br><br></div><div>&nbsp; QuickSort(a, i, ph);<br><br></div><div>}<br><br></div><div>main()<br><br></div><div>{<br><br></div><div>&nbsp; int dso[100], ptu;<br><br></div><div>&nbsp; printf("Nhap bao nhieu phan tu: ");<br><br></div><div>&nbsp; scanf("%d",&amp;ptu);<br><br></div><div>&nbsp; NhapMang(dso, ptu);<br><br></div><div>&nbsp; printf("Day so vua nhap la: ");<br><br></div><div>&nbsp; XuatMang(dso, ptu);<br><br></div><div>&nbsp; QuickSort(dso, 1, ptu);<br><br></div><div>&nbsp; printf("\nDay so sau khi sap xep la:\n");<br><br></div><div>&nbsp; XuatMang(dso, ptu);<br><br></div><div>}<br><br></div>]]></description>
         <enclosure url="" />
         <pubDate>2022-12-22 07:58:56 UTC</pubDate>
         <guid>https://padlet.com/LeThePhu/nlwzgly9fzvjpg0m/wish/2427299550</guid>
      </item>
   </channel>
</rss>
