All Articles

Combinational Optimization Problem

The Knapsack problem is a classic optimization problem in computer science and mathematics. It belongs to a class of problems known as combinatorial optimization problems. The basic idea of the...

Given N, find the smallest number with the same digits

Write a method that, given an original number N, returns the smallest number with the same number of digits.