Path with maximum average value

Problem Statement The problem “Path with maximum average value” states that you are given a 2D array or a matrix of integers. Now consider you are standing at the top-left cell and need to reach the bottom right. For reaching the destination, you need to move along either in the …

Read morePath with maximum average value

Rearrange array such that even index elements are smaller and odd index elements are greater

Problem Statement You have given an array of integers. The problem “Rearrange array such that even index elements are smaller and odd index elements are greater” asks to rearrange the array in such a manner that the even index elements should be smaller than the odd index elements in a …

Read moreRearrange array such that even index elements are smaller and odd index elements are greater