Skip to content

Conversation

Matvey-cmd
Copy link
Contributor

No description provided.

#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
Contributor

Choose a reason for hiding this comment

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

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


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

Choose a reason for hiding this comment

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

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

@LostPointer
Copy link
Contributor

формат упал

#include <utility>
#include <vector>

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

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

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

#include <utility>
#include <vector>

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

Choose a reason for hiding this comment

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

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

Copy link
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
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