ãœãŒãã¢ã«ãŽãªãºã
æ¯èŒããŒã¹ã®ã¢ã«ãŽãªãºã ïŒããã«ãœãŒããã¯ã€ãã¯ãœãŒããããŒãžãœãŒããããŒããœãŒãïŒãšç·åœ¢æéãœãŒãïŒã«ãŠã³ãã£ã³ã°ãœãŒããåºæ°ãœãŒãïŒã§ããŒã¿ãæŽçããæè¡ããã¹ã¿ãŒããŸããããå®å®ãœãŒããšäžå®å®ãœãŒãã®äœ¿ãåããæéãšç©ºéã®ãã¬ãŒããªããçè§£ããããŒã¿ããŒã¹ãæ€çŽ¢ãšã³ãžã³ãããŒã¿åŠçãã€ãã©ã€ã³ã§ã®å®éã®å¿çšäŸãåŠã³ãŸãã
ããã«ãœãŒã
Beginner飿¥ããèŠçŽ ãç¹°ãè¿ãæ¯èŒããé åºãééã£ãŠããå Žåã«äº€æããæãåºæ¬çãªãœãŒãã¢ã«ãŽãªãºã ã§ããæ³¡ãæ°Žé¢ã«äžããããã«ã倧ããªå€ãåŸã ã«é åã®æ«å°Ÿã«ç§»åããŸããå°èŠæš¡ãªããŒã¿ã»ããããœãŒãã®åºç€ãçè§£ããããã®æè²ç®çã«æé©ã§ãã
éžæãœãŒã
Beginneræå°ã®èŠçŽ ãèŠã€ããŠç¹°ãè¿ãåæ¹ã«ç§»åãããŸããåååŸ©ã§æ®ãã®èŠçŽ ããæå°å€ããéžæããããœãŒãæžã¿éšåã®åŸãã«é 眮ããŸããã¡ã¢ãªäœ¿çšéã¯æå°éã§ã·ã³ãã«ã«å®è£ ã§ããŸãããå ¥åã«é¢ä¿ãªãåžžã«O(n²)ã®æéãããããŸãã
ã¯ã€ãã¯ãœãŒã
IntermediateããããèŠçŽ ãéžæããå°ããå€ãå·ŠåŽã倧ããå€ãå³åŽã«é 眮ããŠé åãåå²ããéåžžã«å¹ççãªãœãŒãã¢ã«ãŽãªãºã ã§ããå¹³åO(n log n)ã§ãå®éã«æãåºã䜿çšãããŠãããœãŒãæ¹æ³ã§ããã»ãšãã©ã®ããã°ã©ãã³ã°èšèªã®çµã¿èŸŒã¿ãœãŒã颿°ã®åºç€ãšãªã£ãŠããŸãã
ããŒããœãŒã
Advancedæå€§ããŒããæ§ç¯ããã«ãŒãèŠçŽ ãç¹°ãè¿ãæœåºããŠãœãŒãããäºåããŒãããŒã¿æ§é ã䜿çšããŸãããã¹ãŠã®å Žåã§O(n log n)ã®æéèšç®éãä¿èšŒãã远å ã¡ã¢ãªãå¿ èŠãšããŸãããåªå 床ä»ããã¥ãŒã®å®è£ ã®åºç€ã«ããªã£ãŠããŸãã
Counting Sort
IntermediateA non-comparison sorting algorithm that counts occurrences of each element and uses arithmetic to determine positions. Achieves O(n+k) time complexity where k is the range of input values. Ideal for sorting integers within a known, limited range. Forms the basis for radix sort.
Radix Sort
AdvancedA non-comparison sorting algorithm that processes elements digit by digit from least significant to most significant. Uses counting sort as a subroutine for each digit position. Achieves O(d(n+k)) time where d is the number of digits. Excellent for sorting integers or fixed-length strings.
Shell Sort
IntermediateAn optimization of insertion sort that allows exchange of elements that are far apart. Uses a gap sequence that decreases to 1, enabling the algorithm to move elements closer to their final positions faster. Named after Donald Shell who invented it in 1959.
Bucket Sort
AdvancedA distribution-based sorting algorithm that distributes elements into a number of buckets. Each bucket is then sorted individually using another sorting algorithm. Works best when input is uniformly distributed over a range. Average time complexity is O(n+k).
ããŒãžãœãŒã
Intermediateé åãååã«åå²ããåååãååž°çã«ãœãŒãããŠããçµåããåå²çµ±æ²»ã¢ã«ãŽãªãºã ã§ããO(n log n)ã®æéãä¿èšŒããå®å®ã§ããã远å ã¡ã¢ãªãå¿ èŠã§ããå€§èŠæš¡ãªããŒã¿ã»ãããé£çµãªã¹ãã®ãœãŒãã«ç¹ã«å¹æçã§ãã
æ¿å ¥ãœãŒã
Beginnerææã®ã«ãŒãããœãŒãããããã«ãåèŠçŽ ãäžåºŠã«é©åãªäœçœ®ã«æ¿å ¥ããŸããæ¢ã«ãœãŒãæžã¿ã®ããŒã¿ã«å¯ŸããŠO(n)æéã§å®è¡ããããããå°èŠæš¡ãªé åãã»ãŒãœãŒãæžã¿ã®ããŒã¿ã»ããã«éåžžã«å¹ççã§ããã·ã³ãã«ãªããé©å¿çãªã¢ã«ãŽãªãºã ã§ãã
Comb Sort
BeginnerImprovement over bubble sort that eliminates small values near the end of the list (turtles). Uses a shrinking gap sequence starting with array length, improving worst-case complexity. Practical for medium-sized datasets where simple implementation is valued over optimal performance.
Gnome Sort
BeginnerSimple sorting algorithm similar to insertion sort, named after the way garden gnomes sort flower pots. Moves backward when elements are out of order, then forward again. While O(n²) like bubble sort, its simplicity makes it useful for teaching sorting concepts and handling small datasets.
ð¡ åŠç¿ã®ãã³ã
åºç€ãåºããããã«åçŽã¬ãã«ã®ã¢ã«ãŽãªãºã ããå§ããäžçŽããã³äžçŽã®ãããã¯ã«é²ãã§ãã ãããåã¢ã«ãŽãªãºã ã«ã¯ãã€ã³ã¿ã©ã¯ãã£ããªå¯èŠåãè€é床åæãè€æ°ã®èšèªã§ã®ã³ãŒãäŸãå«ãŸããŠããŸãã