Skip to content

Conversation

@dalnoboy75
Copy link

No description provided.

#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 строка)

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 на весь файл

@LostPointer
Copy link
Contributor

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

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