Introduction: Kadane Algorithm is an efficient way to solve the maximum sub array problem. Explanation: So before we know about Kadane algorithm, first we shall look at that is the maximum sub array problem? You will be given with an array, you need to find the …

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 …