Sort List

The Sort List problem is:

Subset Sum Problem

The 3Sum problem is:

Find Top Source IP Addresses in Distributed Systems

The problem is:

Longest Palindromic Substring

The Longest Palindromic Substring problem is:

The First Occurrence of Needle In Haystack

The problem is:

Longest Consecutive Sequence

The problem is:

Top N Numbers

The problem is:

N-Queens Problem

N-Queens Problem:

Combination Sum Problem - A Non-recursive Method

Combination Sum Problem:

Coin Change Problem

Given \(N\) denominations,how can a given amount of money \(V\) be made with the least number of coins? The most intuitive solution is greedy algorithm: sort the denominations, try the largest denominations lower than the value every time, and decrease the value with the denominations picked in every iteration. Repeat this process until the value reduces to 0. This greedy strategy works for the US (and most other) coin systems, However, it is not a general solution to all denomincations. For example, if the coin denominations were 1, 3 and 4, then to make 6, the greedy algorithm would choose three coins (4,1,1) whereas the optimal solution is two coins (3,3).