//Write comment for the method below I usually feel very lazy to write comments (I know its a bad practice)... I wrote the above once for a C# application I was writing.
N
novice__geek
@novice__geek
Posts
-
What is your best code comment this year? -
Fast Image Processing - programming language to usewhy isn't talking about matlab?
-
Optimization problem with setsYour problem sounds like the knapsack problem. 4^n just acts as item-id (given in this peculiar notation to confuse) while k is the capacity of the knapsack. Its easy to solve this problem using the method of dynamic programming. Brute-force approaches which rely on generating combination also exist.
-
Shortest path relatedYes... In fact this is also the brute-force method to solve micro-mouse maze. It always works.. :)