An algorithmic technique to solve a problem using recursion one piece at a time.
#3 key elements of Bactracking are:
1.Choice
2.constraints
3.goal
int solve(graph/board)
{
#choice-----------------------placing it in board/graph
if yes than put it in position and recurr for next position
now for next if solve return true than continue
otherwise do backtrack and change the prev position
int main(){
graph/board
if(solve(board/graph)){
print(sol)
}
else
{
print(no sol)
}
}