Skip to content

Conversation

@iisat
Copy link
Owner

@iisat iisat commented Nov 14, 2018

No description provided.

Copy link

@Dzhoker1 Dzhoker1 left a comment

Choose a reason for hiding this comment

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

Оставил комментарии по коду

print(mod_size(maxpos))
print(mod_size(array))
print(mod_size(countarray))
print(f'Summary: {mod_size(maxpos) + mod_size(array) + mod_size(countarray)}')

Choose a reason for hiding this comment

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

Константы решили не добавлять? )))

#14
#Summary: 183858

# Вывод - функция 1 - жертвуем памятью ради быстродействия, функция 2 - жертвуем быстродействием - экономим память

Choose a reason for hiding this comment

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

Отлично

for i in a:
if a[i] != 0:
b.append(a[i])
#del a

Choose a reason for hiding this comment

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

Хорошо, что закомментировали. Даже успел подумать об ошибке при замерах удалённой переменной

#findsimple(100)
#Summary: 1868

# В данном случае можем сделать точно такой же вывод как и в первом случае - алгоритм, экономнее расходующий память

Choose a reason for hiding this comment

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

Отличная работа.

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.

3 participants