In this tutorial we shall learn about what is P, NP, NP hard, NP Complete problems. This is a complex topic. I have tried my best to make you understand in a easy way. First, full form of P and NP. P -> Polynomial Time …
Problem Statement: You are given a string “s” and a pattern ‘p’. You need to find if the pattern is present in the string “s”. Usually we can solve this by brute force approach. i.e comparing one letter after another, till we find the sub …
Bellman Ford algorithm us used to find shortest path from source to destination. It can be solved through Dynamic Programming approach. A simple example can be thought as travelling from city A to city B. There are multiple routs, you need to find the route …