Find a peak element in an array

This algorithm to find peak element in an array, Peak element is an element which has greater value than its left and right element. one way to get peak element is using linear search which takes O(n), but we can also search using binary algo.

Share

Find all possible paths in matrix

This is to find all possible paths starting from left top corner of matrix to right bottom corner But we have constrain on this. You can only move Right or bottom and we also have blocking, Here blocking means 0 and path means 1. You can move to particular right or bottom if we have… Read more

Share