求最值
Data Structures & Algorithms · 5 notes
- Burst Balloonshistorical
Each balloon carries a number, and bursting it earns points based on its neighbors. Choose a bursting order that maximizes the total score.
- House Robberhistorical
You are a professional robber planning to rob houses along a street. Each house contains some cash. The only constraint is that adjacent houses have connected security systems, and the alarm will automatically trigger if two adjacent houses are broken into on the same night.
- Best Time to Buy and Sell Stock with Cooldownhistorical
Given daily stock prices, find the maximum trading profit when selling a stock requires a one-day cooldown before buying again.
- Minimum Path Sumhistorical
Given an m x n grid of non-negative integers, find a path from the top-left corner to the bottom-right corner such that the sum of the numbers along the path is minimized.
- Longest Increasing Subsequencehistorical
Given an integer array nums, find the length of the longest strictly increasing subsequence.