Код: Выделить всё
class Solution {
vector list;
public:
vector buildHeap(vector &A) {
// code here
list = A;
auto N = list.size(); // when I change auto to size_t and in for loop auto to size_t then work well, what is the reason keyword "auto: we shouldn't use here sorry if silly
for(auto c = N-1;c>=0;c--)
{
auto p=c;
while((2*p+1)
int main(int argc, const char * argv[]) {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79443678/what-is-the-problem-using-auto-keyword-in-code-runs-infinite-in-c[/url]
Мобильная версия