scala solution
scala\nobject Solution {\n  def maximumBinaryString(binary: String): String =\n    lazy val (t,d) = binary.toList.span(_ == \'1\')\n    lazy val ones = d.count(
```scala\nobject Solution {\n  def maximumBinaryString(binary: String): String =\n    lazy val (t,d) = binary.toList.span(_ == \'1\')\n    lazy val ones = d.count(_ == \'1\')\n    if (d.size == 0) binary\n    else (t ++ List.fill(d.size - 1 - ones)(\'1\') ++ \n      List(\'0\') ++ List.fill(ones)(1)).mkString\n}\n```
['Scala']