-
Notifications
You must be signed in to change notification settings - Fork 0
Hw3 #4
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
base: master
Are you sure you want to change the base?
Conversation
hw1/.idea/misc.xml
Outdated
| @@ -1,6 +0,0 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ну вот смерджу я сейчас это с мастером, например, и что будет? в мастере все эти файлы тоже пропадут. в этом пуллреквесте должны быть только добавлены файлы с новым ДЗ, все остальные файлы тут трогать не стоит вообще никак.
ну то есть просто сделать коммит, который удаляет ненужный тут код -- это не вариант. надо либо откатить коммиты, которые этот код изначально сюда добавляют, либо вообще сделать новую ветку и переложить туда хорошие коммиты (я за второй вариант)
| * @return string | ||
| */ | ||
| private static String getCharForNumber(int i) { | ||
| return i > 0 && i < 27 ? String.valueOf((char) (i + 64)) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не стоит использовать в коде магические константы
| private TrieNode root; | ||
|
|
||
| public Trie() { | ||
| root = new TrieNode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лучше совместить с инициализацией
|
|
||
| /** | ||
| * Function that adds string from letters of alphabet to the trie. | ||
| * Returns true if the trie didn't have that string before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это не нужно в общем описании, для этого есть тег @return ниже
а вот что в описание стоит добавить, так это асимптотику операции
| * @param element to be removed | ||
| * @return true if element was in trie, false otherwise | ||
| */ | ||
| public boolean remove(String element) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это какая-то очень сложная функция, предлагаю выделить из неё несколько вспомогательных с хорошими именами. а то может и в класс ноды какую-нибудь функциональность убрать
No description provided.