## find all distinct sums

Given a sum total and list of n positive integers find all distinct sums that add up to sum total. For example if the given sum total is 5...

## Search Word In Matrix

Search Word In Matrix problem states that “Given a 2D matrix filled with some characters. Check whether the word exist in the matrix or not”. All movements right, left,...

## UAV 729 The Hamming Distance Backtracking Problem

This problem simply states that we have to print all permutation of binary number of length N with M number of 1’s. Let us see the below example test...

## Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or down. You may...

## UVA 929 Number Maze Dijkstra based problem

UVA 929 Number Maze Dijkstra based problem. We have already discussed Dijkstra algorithm for shortest path from source to destination here http://wikistack.com/shortest-path-problem-dijkstras-algorithm/. The given problem at this link https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=870...

## Find longest cycle in directed graph

Find longest cycle in directed graph. A cycle is a close path in graph. For example below given directed graph contains a cycle of maximum length of 5 starting...

## UVA Backtracking problem 639 Don’t Get Rooked solution

UVA Backtracking problem 639 Don’t Get Rooked solution. The given problem is based on backtracking. https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=580. ...

## Check whether partially filled sudoku is valid

Write c or c++ program to check whether partially filled sudoku is valid. The given grid size is 9×9, divided into 9 regions of 3×3. Each row must contain...

## c program to check line segment intersection

write a c program to check line segment intersection. we have already discussed the line segment intersection theory on our previous post http://wikistack.com/line-segment-intersection/. Now we know how to make...

## maximum submatrix sum problem

Given a 2D matrix find the maximum submatrix sum in it. The matrix is containing positive and negative integers. For example The maximum submatrix sum is 15 in the...