Tap here to switch tabs
Problem
Submissions

Problem: Remove Digit From Number to Maximize Result

Remove Digit From Number to Maximize Result asks you to remove exactly one chosen digit from a numeric string and return the largest possible integer representation.

Statement

Given a string number representing a positive integer and a character digit, return the maximum possible string representation of the integer obtained by removing exactly one occurrence of digit from number.

Constraints:

  • 2≤2 \leq number.length ≤100\leq 100

  • number consists of digits from ′1′'1' to ′9′'9'.

  • digit is a digit from ′1′'1' to ′9′'9'.

  • digit occurs at least once in number.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Remove Digit From Number to Maximize Result

Remove Digit From Number to Maximize Result asks you to remove exactly one chosen digit from a numeric string and return the largest possible integer representation.

Statement

Given a string number representing a positive integer and a character digit, return the maximum possible string representation of the integer obtained by removing exactly one occurrence of digit from number.

Constraints:

  • 2≤2 \leq number.length ≤100\leq 100

  • number consists of digits from ′1′'1' to ′9′'9'.

  • digit is a digit from ′1′'1' to ′9′'9'.

  • digit occurs at least once in number.