From 9cce1e346826096682739933f2df67b7344b0b26 Mon Sep 17 00:00:00 2001 From: Shashmitha V Date: Fri, 25 Oct 2024 21:57:36 +0530 Subject: [PATCH] Update n-queens_algorithm.md --- docs/backtracking-algorithms/n-queens_algorithm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/backtracking-algorithms/n-queens_algorithm.md b/docs/backtracking-algorithms/n-queens_algorithm.md index 704676b21..01b63e863 100644 --- a/docs/backtracking-algorithms/n-queens_algorithm.md +++ b/docs/backtracking-algorithms/n-queens_algorithm.md @@ -17,7 +17,7 @@ Backtracking is a technique that builds the solution one piece at a time and rem Here's the Python code for the algorithm: -``` +```python # Function to check if a queen can be placed on the board at [row][col] def is_safe(board, row, col, n): # Check left side of the row