1314

 

10199

 

482

 

Longest Increasing Subsequence

LIS problem has a recursive solution and this also can be solved using DP. Recursive solution:

But the solution has overlapping substructure property The same solution is calculated more than once)it can be solved using DP. DP Solution:

Time complexity of this solution is O(N*N). Better Solution with Time Complexity O(N*logN): Lets assume

315

A vertex in an undirected connected graph is an articulation point (or cut vertex) iff removing it (and edges through it) disconnects the graph. Articulation points represent vulnerabilities in a connected network – single points whose failure would split the network into 2 or more disconnected components. They are useful for designing reliable networks. For

11677

 

11777

 

473

This solution is based on 0/1 knapsack problem. dp[i][j][k] is the maximum amount of songs with i songs while k unit time is left in disk j.

10943

 

10616