|
||
0
0
°íµµ¸®Àλý
°úÁ¦³¿½Ã°¡ ³ª´Âµ¥...
5°³¼ýÀÚ°¡ ÀÖ´Ù i¹øÁö¿Í i+1¹øÁöÀÇ °ªÀ» ²¨³½´Ù ºñ±³ÇÑ´Ù Å©±â¿¡ µû¶ó À§Ä¡¸¦ ¹Ù²Û´Ù ¹Ýº¹ÇÑ´Ù |
0
0
ŸÀ̾
´äº¯°¨»çÇÕ´Ï´Ù~ °úÁ¦ ¾Æ´Ï¿¡¿ä¤¾¤¾
|
0
0
¼ú°ªÀº³»°¡³¾²²
¹öºíÁ¤·ÄÀÌ¿ëÇϼ¼¿ä
¿¹Àü¿¡ Â¥³ù´ø ¼Ò½º¿ä for (int i = 0; i < a.Length; i++) { for (int j = 0; j < a.Length - 1; j++) { if (Convert.ToInt32(a[j]) > Convert.ToInt32(a[j + 1])) { string temp = a[j]; a[j] = a[j + 1]; a[j + 1] = temp; } } } |
0
0
ŸÀ̾
´äº¯°¨»çÇÕ´Ï´Ù~^^
|
0
0
[* ºñȸ¿ø *]
ÀϹÝÀûÀ¸·Î Â¥±â ½¬¿î
»ðÀÔÁ¤·Ä, ¹öºíÁ¤·Ä ÀÌ°ÚÁÒ |
0
0
ŸÀ̾
°¨»çÇÕ´Ï´Ù~~
|
|
|
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û | ¸ñ·Ïº¸±â |
·çÇÁ¾È¿¡¼ µ¹¸®°Å³ª ¼Óµµ°¡ ¹®Á¦°¡ ¾Æ´Ï¶ó¸é 5°³¹Û¿¡ ¾ÈµÇ´Ï ±¸ÇöÇϱâ ÆíÇÑ°É·Î ¾Æ¹«°Å³ª °ñ¶ó½áµµ µÉ°Å °°Àºµ¥¿ä.
5°³¸¦ Á¤·ÄÇÒ¶§ Æò±Õ O(n log n) = 11, ÃÖ´ë O(n^2) = 25 Á¤µµ ³ª¿À³×¿ä