Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.collection.mutable.ListBuffer
- object Meeting {
- def meeting(s: String): String = {
- var splited = s.split(';').toList
- var l:ListBuffer[String]=new ListBuffer[String]
- def splitting(NS: List[String]): List[String] = {
- if (NS.nonEmpty) {
- l.append(("("+NS.head.split(':')(1)+", "+NS.head.split(':')(0)+")").toUpperCase())
- splitting(NS.tail)
- }
- else l.sorted.toList
- }
- def print(d:List[String], str:String):String={
- if (d.nonEmpty) print(d.tail, str+d.head)
- else str
- }
- print(splitting(splited), "")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement