NeetCode #686LC-1035Medium1-D Dynamic Programming
← Back to All Problems

#686 · #1035 · Uncrossed Lines(不相交的线)

📌 Problem Statement & Constraints

You are given two integer arrays nums1 and nums2. Draw connecting lines between equal values, preserving order, so that no two lines cross. Return the maximum number of lines that can be drawn. Constraints: 1 <= nums1.length, nums2.length <= 500, 1 <= nums1[i], nums2[i] <= 2000.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!