Each of these permutations represents a unique arrangement of the elements. Total number of permutations of a set will always be n!
Given an integer array nums, return all the different possible non-decreasing subsequences of the given array with at least two elements.
The Tower of Hanoi is a mathematical puzzle (game) consisting of three rods and a number of disks.
The objective of the puzzle is to move all the disks from the first rod (A) to the next rod (B) using the auxiliary rod (C).
Given a NxN matrix with 0s and 1s. A block with value 1 can be used to travel ahead in the matrix. Now, consider mat as the starting point for the rat.
The number of possible partition of a set of n elements is B(n) known as Bell number. As we know, this problem is NP-Complete i.e. it has non-polynomial time solution.
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other.
Backtracking is a general algorithm for finding solutions to some computational problems, that incrementally builds candidates to the solutions, and abandons a candidate (“backtracks”) as soon as it determines that the candidate cannot possibly be completed to a valid solution.