scala oneliner
```scala []\nobject Solution {\n  def maxNonDecreasingLength(nums1: Array[Int], nums2: Array[Int]): Int =\n    nums1.length min (nums1 zip nums2).map{case (a,b) => List(a, b)}.sliding(2,1)\n      .scanLeft(List(1,1)){case (cnts,l) => l.last.map { num =>\n        (l.head.iterator zip cnts).filter(num >= _._1).map(_._2).maxOption.getOrElse(0) + 1\n      }}.flatten.max\n}\n```
['Dynamic Programming', 'Scala']