feat: Reworked/updated sorting/selection_sort.cpp. (#1613)

* Reworked selection_sort.cpp with fixes.

* Added Recursive implementation for tree traversing

* Fix #2

* Delete recursive_tree_traversals.cpp

* Update selection_sort.cpp

* Changes done in selection_sort_iterative.cpp

* updating DIRECTORY.md

* clang-format and clang-tidy fixes for 4681e4f7

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update selection_sort_iterative.cpp

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update sorting/selection_sort_iterative.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

* clang-format and clang-tidy fixes for ca2a7c64

* Finished changes requested by ayaankhan98.

* Reworked on changes.

* clang-format and clang-tidy fixes for f79b79b7

* Corrected errors.

* Fix #2

* Fix #3

* Major Fix #3

* clang-format and clang-tidy fixes for 79341db8

* clang-format and clang-tidy fixes for 9bdf2ce4

* Update selection_sort_iterative.cpp

* clang-format and clang-tidy fixes for 9833d7a7

* clang-format and clang-tidy fixes for b7726460

Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Abhinn Mishra <49574460+mishraabhinn@users.noreply.github.com>
This commit is contained in:
Lajat5
2021-10-25 23:47:33 +05:30
committed by GitHub
parent 4d884b0dc7
commit b3a0070a74
10 changed files with 322 additions and 208 deletions

View File

@@ -22,7 +22,8 @@
*/
namespace ciphers {
/** \namespace atbash
* \brief Functions for the [Atbash Cipher](https://en.wikipedia.org/wiki/Atbash) implementation
* \brief Functions for the [Atbash
* Cipher](https://en.wikipedia.org/wiki/Atbash) implementation
*/
namespace atbash {
std::map<char, char> atbash_cipher_map = {
@@ -43,7 +44,7 @@ std::map<char, char> atbash_cipher_map = {
* @param text Plaintext to be encrypted
* @returns encoded or decoded string
*/
std::string atbash_cipher(std::string text) {
std::string atbash_cipher(const std::string& text) {
std::string result;
for (char letter : text) {
result += atbash_cipher_map[letter];