you give integer array nums1 nums2 we write integer nums1 nums2 order give separate horizontal linesWe draw connect line straight line connect number nums1i nums2j thatnums1i nums2j andthe line draw intersect connect nonhorizontal linenote connect line intersect endpoint ie number belong connect lineReturn maximum number connect line draw way example 1input nums1 142 nums2 124output 2explanation we draw 2 uncrossed line diagramWe draw 3 uncrossed line line nums11 4 nums22 4 intersect line nums122 nums212Example 2Input nums1 25125 nums2 1052152output 3Example 3input nums1 137175 nums2 19251output 2 Constraints1 nums1length nums2length 5001 nums1i nums2j 2000