Skip to content

Commit

Permalink
Python interview practise: N Queens.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tafara-N committed Aug 31, 2024
1 parent a110f93 commit 0cdb05b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions 0x05-nqueens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ The “0x05. N queens” project is a classic problem in computer science and ma
1. **Backtracking Algorithms:**

- Understanding how backtracking algorithms work to explore all potential solutions to a problem and backtrack when a solution cannot be completed.
- [Backtracking Introduction](https://intranet.alxswe.com/rltoken/Gbaz9HkwvR9FX4zjBt9dSw)
- [Backtracking Introduction](https://www.geeksforgeeks.org/introduction-to-backtracking-2/)

2. **Recursion:**

- Using recursive functions to implement backtracking algorithms.
- [Recursion in Python](https://intranet.alxswe.com/rltoken/X1vaNXgy_pPyvKfOJm90XQ)
- [Recursion in Python](https://realpython.com/python-thinking-recursively/)

3. **List Manipulations in Python:**

- Creating and manipulating lists, especially to store the positions of queens on the board.
- [Python Lists](https://intranet.alxswe.com/rltoken/P3KbYxmdtSeoJvVfr9Iv0w)
- [Python Lists](https://docs.python.org/3/tutorial/datastructures.html)

4. **Python Command Line Arguments:**

- Handling command-line arguments with the `sys` module.
- [Command Line Arguments in Python](https://intranet.alxswe.com/rltoken/2IF4V6xsY_Nq-xcGDK3Bhw)
- [Command Line Arguments in Python](https://docs.python.org/3.3/library/sys.html#sys.argv)

By studying these concepts and utilizing the resources provided, you will be equipped with the knowledge required to implement an efficient solution to the N queens problem using Python. This project not only tests programming and problem-solving skills but also offers an excellent opportunity to learn about algorithmic thinking and optimization techniques.

# Additional Resources
- [Mock Interview](https://intranet.alxswe.com/rltoken/aQ3uJmGVeZa-R6B1jYTjXg)
- [Mock Interview](https://www.youtube.com/watch?v=GneS80iYa7I)

# Requirements

Expand All @@ -44,7 +44,7 @@ By studying these concepts and utilizing the resources provided, you will be equ

![Judit Polgar](Judit-photo1_602x433.jpg)

Chess grandmaster [Judit Polgár](https://intranet.alxswe.com/rltoken/fZ1ecpPEmVL9nvkBn8WQGg), the strongest female chess player of all time
Chess grandmaster [Judit Polgár](https://en.wikipedia.org/wiki/Judit_Polg%C3%A1r), the strongest female chess player of all time


The `N queens` puzzle is the challenge of placing `N` non-attacking queens on an `N×N` chessboard. Write a program that solves the `N` queens problem.
Expand All @@ -60,7 +60,7 @@ The `N queens` puzzle is the challenge of placing `N` non-attacking queens on an
- You don’t have to print the solutions in a specific order
- You are only allowed to import the `sys` module

Read: [Queen](https://intranet.alxswe.com/rltoken/ghWqI1wvx6g-Ul7nrufMKA), [Backtracking](https://intranet.alxswe.com/rltoken/-hgZbgRFkwmxaKnLnCIuEQ)
Read: [Queen](https://en.wikipedia.org/wiki/Queen_%28chess%29), [Backtracking](https://en.wikipedia.org/wiki/Backtracking)

```bash
julien@ubuntu:~/0x08. N Queens$ ./0-nqueens.py 4
Expand Down

0 comments on commit 0cdb05b

Please sign in to comment.