def qSort(a:List[Int]):List[Int] =
if (a.length < 2) a
else
qSort(a.filter(_ < a.head)) ++
a.filter( _ ==a.head) ++
qSort(a.filter( _ > a.head))
if (a.length < 2) a
else
qSort(a.filter(_ < a.head)) ++
a.filter( _ ==a.head) ++
qSort(a.filter( _ > a.head))
2016-09-07
def walkthru(l:List[Int]):String={
if(l.isEmpty) ""
else l.head.toString+" "+walkthru(l.tail)
}
if(l.isEmpty) ""
else l.head.toString+" "+walkthru(l.tail)
}
2016-09-07