Showing 3 questions
You are given a string and a budget for removing characters. Your goal is to compress the string as much as possible after removing at most k characters. Find the length of the shortest possible compressed string.
#1. String Compression III
You are given dimensions of a grid and constraints on the number of cells you can select and the maximum side length of a selected square. Find the maximum number of ones you can cover by selecting squares within the grid.
#2. Maximum Number of Ones
You are given the head of a singly linked list. Reverse the list and return the new head.
#3. Reverse Linked List