
LeetCode: 121. Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transactio[……]
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transactio[……]
Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area.
class Solution {
public:
in[......]
Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the hist[……]
Given a sorted linked list, delete all duplicates such that each element appear only once.
和82一样 遍历一遍,但是pre->next移动到cur的位置,不是cur->next的位置
class So[......]
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where “adja[……]
Note: The solution set must not contain duplicate subsets.
link: https://leetcode.com/problems/subsets/
[……]