Skip to content

Commit

Permalink
Update encrypt-and-decrypt-strings.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 authored Aug 24, 2022
1 parent 96020fb commit 04c28f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion C++/encrypt-and-decrypt-strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class Encrypter {
string encrypt(string word1) {
string result;
for (const auto& c : word1) {
if (!lookup_.count(c)) return "";
if (!lookup_.count(c)) {
return "";
}
result += lookup_[c];
}
return result;
Expand Down

0 comments on commit 04c28f8

Please sign in to comment.