Data Structures & Algorithms
237 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- 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.
- Letter Combinations of a Phone Numberhistorical
Given a string containing only digits 2-9, return all letter combinations it can represent. The answer may be returned in any order.
- 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.
- Edit Distancehistorical
Given two words word1 and word2, calculate the minimum number of operations required to convert word1 into word2.
- 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.
- Group Anagramshistorical
Given an array of strings, group the anagrams together. Anagrams contain the same letters but in a different order.
- 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.
- Find All Anagrams in a Stringhistorical
Given a string s and a non-empty string p, find all substrings in s that are anagrams of p and return their starting indexes.
- Longest Increasing Subsequencehistorical
Given an integer array nums, find the length of the longest strictly increasing subsequence.
- Longest Common Prefixhistorical
Write a function to find the longest common prefix among an array of strings.