NeetCode #752LC-1531Hard2-D Dynamic Programming
← Back to All Problems

#752 · #1531 · String Compression II(压缩字符串 II)

📌 Problem Statement & Constraints

Run-length encoding replaces a run of L identical characters c with c if L == 1, else c followed by the decimal digits of L. Given a string s and an integer k, delete at most k characters to minimise the encoded length, and return that minimum. Constraints: 1 <= s.length <= 100, 0 <= k <= s.length.
🔒

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!