
题目:backpack I (每个物品取一次,求最多能装多少物品) Given n items with size Ai, an integer m denotes the ...
题型 1. 排序:两个或多个array(一般是sorted)按照某规则排序 88. Merge Sorted Array283. Move Zeroes56. Merge I...
层遍历问题 问题:Binary Tree Level Order Traversal Given a binary tree, return the level order ...
问题: Next Greater Element I You are given two arrays (without duplicates) nums1 and nums...
题目:Add Two Numbers You are given two non-empty linked lists representing two non-negati...
1. 加法: 问题: Calculate the sum of two integers a and b, but you are not allowed to use th...
题目 Given an array of n integers where n > 1, nums, return an array output such that out...
题目:Contains Duplicate Given an array of integers, find if the array contains any duplic...
问题:Reverse Linked List Reverse a singly linked list. Input: 链表头结点 :: ListNode Output: 翻...
题目 Given an integer n, generate all structurally unique BST's (binary search trees) tha...
接触DP最早的应该就是这道题了吧,翻了翻leetcode submission发现最早的是在一年前... 而且是最基础的DP解法。在膜拜了大神们用矩阵甚至直接上斐波那契数列公...