Category: math
The Hamming Distance is the number of different symbols between two strings/numbers (equal length). It can be also considered as the number of changes required to convert from one …
A man is drinking a beer in a pub, he feels boring. A lady comes to him, takes out two coins and says: “Let’s play a game. Let’s throw …
Given n items with size A (i from 0 to n – 1), an integer m denotes the size of a backpack. How full you can fill this backpack? …
Simulated Annealing is a general-purpose meta heuristic optimization algorithm. It is similar to hill climbing but SA has the ability to jump out of local optimal with a decreasing …
Given a four digit calculator, if you rotate it by 180 degree, you may get another ‘valid’ number. For example, 0159 becomes 6510 if rotated 180 degree. The ‘1’ …