Skip to content

Day 4 - Marina#13

Open
Marina7 wants to merge 6 commits intoavl-cpp-training:masterfrom
Marina7:master
Open

Day 4 - Marina#13
Marina7 wants to merge 6 commits intoavl-cpp-training:masterfrom
Marina7:master

Conversation

@Marina7
Copy link
Copy Markdown

@Marina7 Marina7 commented Nov 16, 2018

both exercises

@ncaklovic
Copy link
Copy Markdown
Contributor

Ponešto prijedloga:

  • word_frequency::frequency pretražuje mapu dva puta
  • možda bi is_vowel mogao prvo napraviti towlower pa onda imati 5 usporedbi umjesto 10
  • ne treba lambda u 07b i 08b, samo pošalji is_vowel
  • može li 09 bez reverse-a (ona 4 if-a se napišu u jednoj liniji sa ?:)

Marina7 and others added 2 commits November 19, 2018 22:52
- find and operator[] searched through map two times, use what find found if it did
- use towlower to avoid 10 comparisons
- 4 if statements replaced with ternary operator
- replace sort+reverse with sort using reverse iterator
- add another option with lambda for opposite comparison (if there is no overloaded operator<)
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