#

Title

Solution

Time

Space

Difficulty

Note

740

Delete and Earn

Python

O(n)

O(1)

Medium

DP

1137

N-th Tribonacci Number

Python

O(log(n))

O(1)

Easy

DP, Matrix Exponentiation, Variant of Fibonacci number #509

746

Min Cost Climbing Stairs

Python

O(n)

O(1)

Easy

DP

198

House Robber

Python

O(n)

O(1)

Medium

DP

121

Best Time to Buy and Sell Stock

Python

O(n)

O(1)

Easy

Array

97

Interleaving String

Python

O(n*m)

O(n+m)

Medium

DP

983

Minimum Cost For Tickets

Python

O(n)

O(1)

Medium

DP

790

Domino and Tromino Tiling

Python

O(log(n))

O(1)

Medium

DP, Matrix Exponentiation

1155

Number of Dice Rolls With Target Sum

Python

O(d*f*t)

O(t)

Medium

DP,

718

Maximum Length of Repeated Subarray

Python

O(n*m)

O(min(n,m))

Medium

Backtracking, DP, Hash, Binary Search

1220

Count Vowels Permutation

Python

O(log(n))

O(1)

Hard

DP, Matrix Exponentiation

1473

Paint House III

Python

O(m*t*n^2)

O(t*n)

Hard

DP

265

Paint House II

Python

O(n*k)

O(k)

Hard

Premium, DP

256

Paint House

Python

O(n)

O(1)

Medium

Premium, DP,

714

Best Time to Buy and Sell Stock with Transaction Fee

Python

O(n)

O(1)

Medium

DP

931

Minimum Falling Path Sum

Python

O(n^2)

O(1)

Medium

DP

64

Minimum Path Sum

Python

O(n*m)

O(n+m)

Medium

DP,

63

Unique Paths II

Python

O(n*m)

O(n+m)

Medium

DP,

62

Unique Paths

Python

O(m+n)

O(1)

Medium

DP, Combinatorics

918

Maximum Sum Circular Subarray

Python

O(n)

O(1)

Medium

Array

91

Decode Ways

Python

O(n)

O(1)

Medium

DP

518

Coin Change II

Python

O(n*m)

O(m)

Medium

DP,

276

Paint Fence

Python

O(n)

O(1)

Medium

Premium, DP

309

Best Time to Buy and Sell Stock with Cooldown

Python

O(n)

O(1)

Medium

DP

188

Best Time to Buy and Sell Stock IV

Python

O(n)

O(n)

Hard

DP, Quick Select, Mono Stack

300

Longest Increasing Subsequence

Python

O(n log(n))

O(n)

Medium

DP, Binary Search, Segment Tree

139

Word Break

Python

O(n*l^2)

O(n)

Medium

DP

322

Coin Change

Python

O(n*k)

O(k)

Medium

DP

1335

Minimum Difficulty of a Job Schedule

Python

O(d*n^2)

O(d*n)

Hard

DP

221

Maximal Square

Python

O(n^2)

O(n)

Medium

DP

1143

Longest Common Subsequence

Python

O(n*m)

O(min(n,m))

Medium

DP,

1770

Maximum Score from Performing Multiplication Operations

Python

O(m^2)

O(m)

Hard

DP

#265) here are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. You have to paint all the houses such that no two adjacent houses have the same color.

The cost of painting each house with a certain color is represented by an n x k cost matrix costs.

Return the minimum cost to paint all houses.

#256) There is a row of n houses, where each house can be painted one of three colors: red, blue, or green. The cost of painting each house with a certain color is different. You have to paint all the houses such that no two adjacent houses have the same color.

The cost of painting each house with a certain color is represented by an n x 3 cost matrix costs.

Return the minimum cost to paint all houses.

#276) You are painting a fence of n posts with k different colors. You must paint the posts following these rules:

Given the two integers n and k, return the number of ways you can paint the fence.