Skip to content

Homework 1#8

Open
Matvey-cmd wants to merge 26 commits intoAlgorithmsDafeMipt2024:mainfrom
Matvey-cmd:homework_1
Open

Homework 1#8
Matvey-cmd wants to merge 26 commits intoAlgorithmsDafeMipt2024:mainfrom
Matvey-cmd:homework_1

Conversation

@Matvey-cmd
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread task_01/src/test.cpp Outdated
#include "utils.hpp"

TEST(utils, Simple) {
ASSERT_EQ(Task1(9, std::vector < int > {1, 2, 4, 5, 6, 8, 10, 12}), (std::pair < int, int > {1,8}));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

форматирование

Comment thread task_01/src/test.cpp
Comment thread task_01/src/utils.cpp Outdated

std::pair<int, int> Task1(int num, const std::vector<int> arr) {
if (arr.size() < 2) {
throw WrongVector("");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

давай в исключение добавим какую-то информацию (передадим в конструктор строку)

Comment thread task_01/src/utils.hpp
Comment thread task_01/src/utils.cpp Outdated
@LostPointer
Copy link
Copy Markdown
Contributor

формат упал

Comment thread task_01/src/utils.cpp Outdated
#include <utility>
#include <vector>

std::pair<int, int> Task1(int num, const std::vector<int> arr) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

давай придумаем название по лучше для функции

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

задачи 2-8 должны быть в отдельном ПР

Comment thread task_01/src/utils.cpp Outdated
#include <utility>
#include <vector>

std::pair<int, int> Sum_Of_Elements(int num, const std::vector<int> arr) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SumOfElements по кодстайлу

Comment thread task_03/src/test.cpp
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

решение задач с 2 по 8 нужно унести в дргуой пулл реквест

@Matvey-cmd
Copy link
Copy Markdown
Contributor Author

Matvey-cmd commented Mar 30, 2024 via email

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