Skip to content

LAB_3 - Ахмедов Б. - #1897

Open
Blacklink-afk45 wants to merge 8 commits into
Dovgalyuk:masterfrom
Blacklink-afk45:LAB_3
Open

Blacklink-afk45 wants to merge 8 commits into
Dovgalyuk:masterfrom
Blacklink-afk45:LAB_3

Conversation

@Blacklink-afk45

Copy link
Copy Markdown

No description provided.

@Dovgalyuk

Copy link
Copy Markdown
Owner

Нужны тесты для контейнеров.

Blacklink-afk45 added 3 commits October 22, 2026 18:37
Comment thread LibraryCPP/queue.h Outdated
#include "list.h"

struct Queue {
List list;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Поля должны быть в секции private

Comment thread LibraryCPP/queue.h Outdated

struct Queue {
List list;
ListItem* last;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

last можно запросить у списка.

Comment thread LibraryCPP/Tests/list.cpp
}
std::cout << "\n";

list_delete(list);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Существующие проверки удалять нельзя.

| x | # | # | # |
\ / \ / \ / \ /
| x | x | E |
\ / \ / \ /

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Не хватает больших тестов с развилками.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Файлы от задачи должны быть не в библиотеке.

@Dovgalyuk

Copy link
Copy Markdown
Owner

Файлы не относящиеся к библиотеке всё ещё хранятся там.

@Dovgalyuk

Copy link
Copy Markdown
Owner

Нет тестов для контейнеров.

Comment thread LibraryCPP/queue.h
void queue_insert(Queue* queue, Data data);
Data queue_get(const Queue* queue);
void queue_remove(Queue* queue);
bool queue_empty(const Queue* queue);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Должен быть либо интерфейс в виде класса, либо в виде набора функций, но не одновременно.

Comment thread LibraryCPP/list.cpp
{
struct List {
ListItem dummy;
ListItem* last;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Последний элемент можно просто находить.

Comment thread Lab3CPP/main.cpp
int meeting = -1;
long long best_distance = numeric_limits<long long>::max();

auto expand_layer = [&](Queue& queue, vector<int>& distance,

Copy link
Copy Markdown
Owner

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