Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Pinterest
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Tagged: Arrays

2D Matrix with Obstructions in it"> g6774 1

2D Matrix with Obstructions in it">Dynamic Programming — Count all paths in 2D Matrix with Obstructions in it

Objec­tive: Given two dimen­sional matrix, write an algo­rithm to count all pos­si­ble paths from top left cor­ner to bottom-right cor­ner. You are allowed to move only in two direc­tions, move right OR move down.…

g4212 0

Sort an Array such that the odd numbers appear first followed by the even numbers . The odd numbers in ascending order and the even numbers in descending order.

Objec­tive: Given an array of interg­ers, sort it such that the odd num­bers appear first fol­lowed by the even num­bers . The odd num­bers in ascend­ing order and the even num­bers in descend­ing order. Input:…

g6774 0

Count All Paths from Top left to bottom right in Two Dimensional Array including Diagonal Paths

Objec­tive: Count all the paths from left top cor­ner to right bot­tom cor­ner in two dimen­sional array. Input: Two Dimen­sional array Out­put: No of paths. Approach : 1. Recur­sive Recur­sive solu­tion to this prob­lem is…