Skip to content

Comments

06oct25 Homework#2

Open
imaxde wants to merge 10 commits intomainfrom
06oct25
Open

06oct25 Homework#2
imaxde wants to merge 10 commits intomainfrom
06oct25

Conversation

@imaxde
Copy link
Owner

@imaxde imaxde commented Oct 20, 2025

Queen placement algorithms and their complexity assessment

@imaxde imaxde requested a review from KubEF October 20, 2025 06:36
@@ -0,0 +1,22 @@
## Переборный алгоритм
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно значительно лучше с точки зрения асимптотики

### Память
Рекурсия O(n) и O(n). Общая O(n)

## Третий алгоритм
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предполагается, что вы реализуете сильно более быстрый алгоритм. Проявите социальность, спросите у одногруппников

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предполагается, что вы реализуете сильно более быстрый алгоритм. Проявите социальность, спросите у одногруппников

Кажется, что вы не проявили социальность. Предполагается другое

@imaxde imaxde requested a review from KubEF October 22, 2025 15:01
Comment on lines +11 to +13
Глубина рекурсии n.
В каждом вызове перебирается n вариантов.
Проверкка выполняется за O(n). Итоговая сложность O(n * n^2) = O(n^3).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Итоговая сложность не такая. Вы же делаете рекурсивный вызов в цикле. В общем, вы сильно оптимистичную оценку дали

### Память
Рекурсия O(n) и O(n). Общая O(n)

## Третий алгоритм
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предполагается, что вы реализуете сильно более быстрый алгоритм. Проявите социальность, спросите у одногруппников

Кажется, что вы не проявили социальность. Предполагается другое

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants