1578. Minimum Deletion Cost to Avoid Repeating Letters
Description
**Input:** s = "abaac", cost = [1,2,3,4,5]
**Output:** 3
**Explanation:** Delete the letter "a" with cost 3 to get "abac" (String without two identical letters next to each other).**Input:** s = "abc", cost = [1,2,3]
**Output:** 0
**Explanation:** You don't need to delete any character because there are no identical letters next to each other.**Input:** s = "aabaa", cost = [1,2,3,4,1]
**Output:** 2
**Explanation:** Delete the first and the last character, getting the string ("aba").ac
Previous1577. Number of Ways Where Square of Number Is Equal to Product of Two NumbersNext1579. Remove Max Number of Edges to Keep Graph Fully Traversable
Last updated