Pattern Search Problem

There are several algorithm to solve pattern search from a provided string problem. To solve such problem using Naive method(for all the char of the provided string check whether the pattern  contains or not ). It takes O(m*n),here m = string length of pattern and n= string length of the text. There are several algorithm to solve

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


Learning Sites: To learn Click Here Some Problems About Linked List Dynamic Memory Allocation: Code Snippet:

BellmanFord Algorithm: Take all the edge in a struct as:

Relax all the edge for (node-1)(e.g. total number of node of the vertex) number of time. After that check one more time if all the edges are