Skip to content

Commit 40d5ca8

Browse files
committed
refinement of design pattern specifics
1 parent 02c06fe commit 40d5ca8

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

docs/algorithms.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,19 @@ $$O(\log_2 n) \implies O(\log n)$$
466466
- Use [Divide and Conquer](#divide-and-conquer) when you **don't have overlapping sub problems**
467467
- Use [Decrease and Conquer](#decrease-and-conquer) when you can **discard/ignore parts of the input** entirely
468468
- Use [Dynamic Programming](#dynamic-programming) when you **do have overlapping sub problems**
469-
- Use [Backtracking](#backtracking) when you need to backtrack 😎
469+
- Use [Backtracking](#backtracking) when you can solve parts of the problem along the way and re-trace your steps when you make a mistake
470+
- Use [Greedy](#greedy) when you see an optimisation that involves disregarding future consequences (which shoudn't normally exist in greedy implimentations)
471+
- Use [Brute Force](#brute-force) when you can't do it any other way.
472+
473+
Both iterative and recursive algorithm design patterns in general are also part of the study design.
474+
475+
Both [backtracking](#backtracking) and [greedy](#greedy) algorithms types are debated to be design patterns or not. For the sake of VCE Algorithimics, the study design classes both backtracking and greedy classifications as design patterns in key knowledge and key skill markers:
476+
477+
> - Apply the divide and conquer, dynamic programming and backtracking design patterns to design algorithms and recognise their usage within given algorithms
478+
479+
> - Characteristics and suitability of the brute-force search and greedy algorithm design patterns
480+
481+
The study design also doesn't explicityly list '*Decrease and Conquer*' as a design pattern, but it does list both iterative and recursive patterns which can be applicable to decrease and conquer.
470482

471483
#### Brute Force
472484

@@ -539,15 +551,11 @@ Examples:
539551

540552
Identical problems that are occurring multiples times during computation
541553

542-
### Backtracking
543-
544-
!!! danger
545-
546-
This is not a design pattern. It's more of an 'approach' to solve a problem
554+
#### Backtracking
547555

548-
lmao sudoku
556+
lmao sudoku. please add notes
549557

550-
### Greedy
558+
#### Greedy
551559

552560
Choose best looking path (from a [heuristic](graphs.md#heuristic-functions)) and discard? others
553561
- Fast but not always correct

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ markdown_extensions:
5050
emoji_index: !!python/name:material.extensions.emoji.twemoji
5151
emoji_generator: !!python/name:material.extensions.emoji.to_svg
5252
- footnotes
53+
- pymdownx.highlight:
5354
use_directory_urls: false
5455
plugins:
5556
- search

0 commit comments

Comments
 (0)