Games and Sums

How I solved the sum-subset-problem

The sum subset problem is a well-known problem in computer science and mathematics. The sum subset problem asks whether a given set of positive integers contains a non-empty subset that adds up to a given target sum. I solved the problem by checking all possible subsets of the given set S and checked whether the sum of the subset equals the target sum T. The time...

Royal battles' commanding queens

How I solved the N-Queens problem

The N-queens problem involves placing N chess queens on an NxN chessboard so that no two queens threaten each other. In other words, no two queens are allowed to be in the same row, column, or diagonal. It is an example...