|
Download benchmarks/Algorithms/lcs_n/problem.md from PV-SJTU/PV-Bench: direct link, hf CLI and curl.
- Browser
- Download file 499 Bytes
-
https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/lcs_n/problem.md
- Command line
-
hf download hf://datasets/PV-SJTU/PV-Bench/benchmarks/Algorithms/lcs_n/problem.md
-
curl -L -o problem.md https://huggingface.co/datasets/PV-SJTU/PV-Bench/resolve/main/benchmarks/Algorithms/lcs_n/problem.md
499 Bytes
| # Longest Common Subsequence | |
| ## Description | |
| Given two integer sequences of equal length, find the length of their longest common subsequence. | |
| ## Input | |
| The function receives two arrays `x` and `y`, their common length $n$, and a writable DP table. | |
| ## Output | |
| Return the longest common subsequence length. | |
| ## Constraints | |
| - $0 \le n \le 1000$. | |
| - Both input arrays contain exactly $n$ integers. | |
| ## Source | |
| Classical longest-common-subsequence problem reconstructed from the verified C artifact. | |