object QuickSort {

  def main(args: Array[String]) {

    quickSort(args.map(_.toInt).toList).foreach(println)

  }


  def quickSort[T <% Ordered[T]](values: List[T]): List[T] = {

    values match {

      case (pivot :: xs) =>

        val (left, right) = xs.partition(_ < pivot)

        quickSort(left) ::: (pivot :: quickSort(right))

      case _ => values

    }

  }

}



별로 안좋아하겠지? 그냥 자바로 연습할까