• + 1 comment

    Sorry, I meant the onbe that you posted. Here is my version: def Mingle(P:List[Char],Q:List[Char]):List[Char] = { if(P.isEmpty)return List() return P.head :: Q.head :: Mingle(P.tail,Q.tail) }

    def main(args: Array[String]) {
    
        val P = readLine().toList
        val Q = readLine().toList
        println(Mingle(P,Q).mkString)
    
    }
    

    Note that I don't use the + operator. Thanks,