Skip to content

4th day#15

Open
majabio wants to merge 2 commits intoavl-cpp-training:masterfrom
majabio:master
Open

4th day#15
majabio wants to merge 2 commits intoavl-cpp-training:masterfrom
majabio:master

Conversation

@majabio
Copy link
Copy Markdown

@majabio majabio commented Nov 16, 2018

first and second exercise

@ncaklovic
Copy link
Copy Markdown
Contributor

Ponešto prijedloga:

  • remove_element ne koristi argument index (2?!)
  • list::sort prima binarni predikat, postoje standardni - poput std::greater
  • word_frequency je case insensitive samo za prvo slovo
  • map[s] = ++map[s]; je isto kao samo ++map[s];
  • 04a: accumulate može direktno primiti istream_iterator(e), ne treba dodatni vector
  • 05b, 07a, 08a: ne treba lambda za traženje konstante (algoritam bez _if)
  • zašto 07b i 08b ne koriste is_vowel?
  • is_vowel treba raditi sa wchar_t i može biti samo jedan return (poput c == 'a' || c == 'e' ... )
  • 09 se može i treba napisati sa jednim pozivom std::sort
  • 10b ne treba sort, samo nth_element
  • 12 treba napisati sa pravim algoritmima (min_element/max_element ili minmax_element)
  • treba li lambda u 13, adjacent_difference ionako radi razliku

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