Optimize Caesar Cipher Implementation and Enhance Robustness
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- cryptography
調査の方向性
Start by locating the Caesar cipher implementation and its getCipherMap function. Review how encryption and decryption currently handle the input, then verify that the optimization, invalid-input checks, and case preservation apply consistently to both operations. Done means the requested behavior is implemented without changing correct cipher behavior.
索引モデルが issue の本文から書いたものです。
説明
Description:
The current Caesar cipher implementation works correctly for both encryption and decryption, but there are opportunities for optimization and added functionality:
Optimization: The getCipherMap function unnecessarily clones the charsMap object in every iteration, which can be simplified by directly updating the existing object.
Robustness: There are no checks for invalid inputs, such as non-string data types or empty strings. Adding input validation will make the functions more reliable.
Preserve Case: The cipher converts all characters to lowercase, losing the original case. Enhancing the logic to preserve the case would improve usability.
Suggested Fix:
Optimize the reduce method by removing redundant cloning.
Add input validation checks.
Implement case-sensitive encryption and decryption.
- 主要言語
- JavaScript
- スター
- 197k
- フォーク
- 31k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
trekhleb/javascript-algorithms のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
trekhleb/javascript-algorithms#2225 ·
-
BinarySearchTreeNode removing対応中かも @bbonch が 247 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
trekhleb/javascript-algorithms#2102 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
trekhleb/javascript-algorithms#2221 · コメント 4 件 ·
-
zh-TW translations missing — should contributors help complete?対応中かも @anees4500 が 338 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
trekhleb/javascript-algorithms#2085 · コメント 6 件 · リアクション 1 件 ·
-
LinkedList methods.オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
trekhleb/javascript-algorithms#2065 · コメント 1 件 ·
trekhleb/javascript-algorithms の issue をすべて見る
似ている issue
-
Notifications pagination accepts NaN and negative LIMIT/OFFSET対応中かも @Senthil455 が今日担当しました。 オープンBUGS MEDIUM
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
elixpo/blogs.elixpo#419 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
immich-app/immich#32426 ·
メンテナーはふだん 1 日以内に返信
-
automated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
lirantal/discoprint#45 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
scanaislop/aislop#482 ·
メンテナーはふだん 1 日以内に返信