Skip to content

Conversation

@psolikov
Copy link
Owner

@psolikov psolikov commented Oct 4, 2017

No description provided.

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Collaborator

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;
Copy link
Collaborator

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();
Copy link
Collaborator

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.
Copy link
Collaborator

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) {
Copy link
Collaborator

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