mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-05 03:29:46 +08:00
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 for4681e4f7* 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 forca2a7c64* Finished changes requested by ayaankhan98. * Reworked on changes. * clang-format and clang-tidy fixes forf79b79b7* Corrected errors. * Fix #2 * Fix #3 * Major Fix #3 * clang-format and clang-tidy fixes for79341db8* clang-format and clang-tidy fixes for9bdf2ce4* Update selection_sort_iterative.cpp * clang-format and clang-tidy fixes for9833d7a7* clang-format and clang-tidy fixes forb7726460Co-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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user