Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homework 1 #9

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dalnoboy75
Copy link

No description provided.

task_01/src/utils.hpp Outdated Show resolved Hide resolved
#include <vector>

std::pair<int, int> Func(int number, const std::vector<int> array) {
int left_ind = 0, right_ind = array.size() - 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

давай уже не экономить символы (left_index) и строки (1 объявление 1 строка)

task_01/src/test.cpp Outdated Show resolved Hide resolved
task_01/src/main.cpp Outdated Show resolved Hide resolved
int main() { return 0; }
#include <bits/stdc++.h>
#include "utils.hpp"
using namespace std;
Copy link
Contributor

Choose a reason for hiding this comment

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

отделяй пустыми строками блоки кода, да и я не очень одобряю using namespace на весь файл

task_01/src/utils.cpp Outdated Show resolved Hide resolved
task_01/src/utils.cpp Outdated Show resolved Hide resolved
task_01/src/utils.hpp Outdated Show resolved Hide resolved
@LostPointer
Copy link
Contributor

форматеры упали

task_01/src/test.cpp Outdated Show resolved Hide resolved
right_index--;
}
}
if (array[left_index] + array[right_index] != number) {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

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