Flashcards
Week 9: Backtracking & Stacks/Queues

Cards in this deck (8)
- 1N-Queens problem- Input: positive integer n
- Output: all configurations of n queens on an n x n chessboard such that none of them are attacking each other
- 2General backtracking approachAdvantage over brute force: does not explore a large number of invalid configurations (once an invalid partial solution is reached, algorithm backtracks)

- 3N-Queens using general backtracking template

- 4Extensive reachability problem (recursive)

- 5StackLinear data structure where you can:
- Only interact with the item on top (LIFO)
- 'Push' something to put it on top
- 'Pop' to take something from the top
- Check the size of the stack - 6Depth-first-search

- 7QueueLinear data structure where you can:
- Only interact with front and rear (FIFO)
- 'Enqueue' something to put it at the end of the queue
- Get the 'next' item from the front of the queue - 8Breadth-first search

Information
- Description
- Computer Science (FIT1045: Algorithms & Programming Fundamentals in Python) Flashcards on Week 9: Backtracking & Stacks/Queues, created by Melina Mackey on 24/10/2019.
- Created by
- Melina Mackey
- Views
- 0
- History
-
- Created by Melina Mackey · Sep 2, 2019
- Copied by Melina Mackey · Sep 2, 2019
- Copied by Melina Mackey · Sep 2, 2019
- Copied by Melina Mackey · Sep 2, 2019
- Copied by Melina Mackey · Sep 16, 2019
- Copied by Melina Mackey · Sep 18, 2019
- Copied by Melina Mackey · Sep 21, 2019
- Copied by Melina Mackey · Oct 24, 2019
- Rating