Python 3   || 5 lines, iteration ||   T/S: 98% / 99%
\n\nclass Solution:\n    def maxNonDecreasingLength(self, nums1: List[int],\n                                     nums2: List[int]) -> int:        \n\n        a
\n```\nclass Solution:\n    def maxNonDecreasingLength(self, nums1: List[int],\n                                     nums2: List[int]) -> int:        \n\n        ans, s0, s1 = 1,1,1\n\n        for (a1,b1), (a2,b2) in zip(nums1, nums1[1:], \n                               nums2, nums2[1:]):\n     \n            s0, s1 = (max(s0*(a1 <= b1),  s1*(a2 <= b1))+1, \n                      max(s0*(a1 <= b2),  s1*(a2 <= b2))+1)\n\n            ans = max(ans, s0, s1)\n\n        return ans\n```\n[https://leetcode.com/problems/longest-non-decreasing-subarray-from-two-arrays/submissions/1297165657/](https://leetcode.com/problems/longest-non-decreasing-subarray-from-two-arrays/submissions/1297165657/)\n\n\nI could be wrong, but I think that time complexity is *O*(*N*) and space complexity is *O*(1), in which *N* ~ `len(nums1)`.
['Python3']