Category: greedy

Leetcode Problem Solving 409. Longest Palindrome String 0

Leetcode Problem Solving 409. Longest Palindrome String

Given a [string]  s containing uppercase and lowercase letters, return the longest palindrome constructed from these letters. During construction, be aware of case sensitivity. For example “Aa” cannot be treated as a palindrome. Source:...

Luogu p1792 Remorse and greed 0

Luogu p1792 Remorse and greed

The meaning of the question is probably to let you plant m trees and n two adjacent locations. You can’t plant trees. Trees need money. Ask how much the minimum money you need. First,...

Luogu P1315 Sightseeing Bus (greedy) 0

Luogu P1315 Sightseeing Bus (greedy)

P1315 Sightseeing bus Title description Y City, a small town with charming scenery, has n beautiful scenic spots. As more and more tourists come here, Y City specially arranged a sightseeing bus to provide...