scala oneliner. transpose/sliding
scala []\nobject Solution {\n  import scala.util.chaining._\n  def minDeletionSize(strs: Array[String]): Int = {\n    strs.head.length - strs.to(LazyList).map(_
```scala []\nobject Solution {\n  import scala.util.chaining._\n  def minDeletionSize(strs: Array[String]): Int = {\n    strs.head.length - strs.to(LazyList).map(_.tails.toList.init).transpose\n      .scanLeft(List.fill(strs.length)("")){ case (b,a) =>\n        b.zip(a).map{case (a1,b1) => a1 + b1.take(1)} pipe {b1 =>\n          if(b1.sliding(2,1).forall(l => l.head <= l.last)) b1 else b\n        }\n      }.last.head.length\n  }\n}\n```
['Array', 'String', 'Sliding Window', 'Scala']