Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

leetcode problem 2288. Apply Discount to Prices. #327

Open
vermaaarti opened this issue Oct 8, 2023 · 0 comments
Open

leetcode problem 2288. Apply Discount to Prices. #327

vermaaarti opened this issue Oct 8, 2023 · 0 comments

Comments

@vermaaarti
Copy link

Hey @Saikat2407, I would like to contribute to this problem, Please do assign it to me.
Where:
A sentence is a string of single-space separated words where each word can contain digits, lowercase letters, and the dollar sign '$'. A word represents a price if it is a sequence of digits preceded by a dollar sign.

For example, "$100", "$23", and "$6" represent prices while "100", "$", and "$1e5" do not.
You are given a string sentence representing a sentence and an integer discount. For each word representing a price, apply a discount of discount% on the price and update the word in the sentence. All updated prices should be represented with exactly two decimal places.

Return a string representing the modified sentence.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant