From 5daa9402732979019a7e7fd3bcc30811e2e07931 Mon Sep 17 00:00:00 2001 From: Ming Tsai Date: Fri, 7 May 2021 20:09:31 -0400 Subject: [PATCH] docs: add zh-tw palindrome translate --- README.md | 1 + docs/en/CONTRIBUTING.md | 10 ++++------ docs/en/README.md | 2 +- docs/en/Strings/Palindrome.md | 2 +- docs/zh-tw/CONTRIBUTING.md | 24 ++++++++++++++++++++++ docs/zh-tw/README.md | 6 ++++++ docs/zh-tw/Strings/Palindrome.md | 34 ++++++++++++++++++++++++++++++++ 7 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 docs/zh-tw/CONTRIBUTING.md create mode 100644 docs/zh-tw/README.md create mode 100644 docs/zh-tw/Strings/Palindrome.md diff --git a/README.md b/README.md index d1f75791..a64fe489 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Data structure and Algorithm (DSA) ## Explanations - [English](./docs/en) +- [中文台灣](./docs/zh-tw) ## Contribution Guidelines diff --git a/docs/en/CONTRIBUTING.md b/docs/en/CONTRIBUTING.md index 497c1b99..665a4641 100644 --- a/docs/en/CONTRIBUTING.md +++ b/docs/en/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Algorithm Name -Write a short description of algorithm like: +Write a short description of the algorithm like: 1. Time Complexity 2. Space Complexity 3. Applications @@ -8,17 +8,15 @@ Write a short description of algorithm like: 5. etc... ## Steps - -Describe the algorithm in clear, simple and understandable steps. +Describe the algorithm in clear, simple, and understandable steps. ## Example - -Trace the algorithm with a sample input data. +Trace the algorithm with sample input data. ## Implementation Links to their implementation in programming languages. -NOTE: The link should be within the other repos of this organization only. +NOTE: The link should be within the algorithms folder only. ## Video URL diff --git a/docs/en/README.md b/docs/en/README.md index 01586edb..2499489b 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -6,4 +6,4 @@ - [Palindrome](./Strings/Palindrome.md) ## Others -[How to add an new algorithm documentation ?](./CONTRIBUTING.md) +[How to add new algorithm documentation?](./CONTRIBUTING.md) diff --git a/docs/en/Strings/Palindrome.md b/docs/en/Strings/Palindrome.md index 3ec55394..1b97db4b 100644 --- a/docs/en/Strings/Palindrome.md +++ b/docs/en/Strings/Palindrome.md @@ -30,7 +30,7 @@ A palindrome is a word, phrase, number or sequence of words that reads the same - [Rust](../../../algorithms/Rust/strings/palindrome/src/main.rs) ## Video URL -* [A coursera video explaining the palindrome Algorithm](https://www.coursera.org/lecture/program-code/palindrome-algorithm-1-zzQqs) +[A coursera video explaining the palindrome Algorithm](https://www.coursera.org/lecture/program-code/palindrome-algorithm-1-zzQqs) ## Others [Wikipedia](https://en.wikipedia.org/wiki/Palindrome) diff --git a/docs/zh-tw/CONTRIBUTING.md b/docs/zh-tw/CONTRIBUTING.md new file mode 100644 index 00000000..4d86a7b3 --- /dev/null +++ b/docs/zh-tw/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# 演算法名稱 + +寫一個簡短的算法描述,例如: +1. 時間複雜度 +2. 空間複雜度 +3. 應用領域 +4. 創辦人姓名 +5. 等等... + +## 步驟 +用清晰,簡單和可理解的步驟描述算法。 + +## 例子 +使用樣本輸入數據跟踪算法。 + +## 程式碼 +鏈接到已編寫的代碼。 +注意: 該鏈接應僅在algorithm文件夾內. + +## 影片網址 +附加說明該算法的視頻網址。 + +## 其他 +任何其他信息始終受到歡迎,應包含在本節中。 diff --git a/docs/zh-tw/README.md b/docs/zh-tw/README.md new file mode 100644 index 00000000..2eb72999 --- /dev/null +++ b/docs/zh-tw/README.md @@ -0,0 +1,6 @@ +# 演算法 +## 字符串 +- [回文](./Strings/Palindrome.md) + +## 其他 +[如何添加新的算法文檔?](./CONTRIBUTING.md) diff --git a/docs/zh-tw/Strings/Palindrome.md b/docs/zh-tw/Strings/Palindrome.md new file mode 100644 index 00000000..4cb1f068 --- /dev/null +++ b/docs/zh-tw/Strings/Palindrome.md @@ -0,0 +1,34 @@ +# 回文 +回文,亦称回环,是正读反读都能读通的句子,亦有将文字排列成圆圈者,是一種修辭方式和文字游戏。回環運用得當,可以表現兩種事物或現象相互依靠或排斥的關係。 + +## 步驟 +1. 清潔字符串,通過刪除所有標點符號和空格並將所有字母轉換為小寫字母。 +2. 反轉乾淨的字符串。 +3. 如果乾淨的字符串與反向字符串相同,則這個字符串是回文。 + +## 例子 +### 單字回文 +- 媽媽。 +- 爸爸。 +- 上海自來水來自海上。 + +### 多詞回文 +- 改變的環境影響人類的活動,活動的人類影響環境的改變。 +- 自我突破,突破自我。 +- 好像对我说,说我对象好。 +- 人人为我、我为人人。 + +## 程式碼 +- [C](../../../algorithms/C/strings/palindrome.c) +- [C#](../../../algorithms/CSharp/src/Strings/palindrome.cs) +- [Haskell](../../../algorithms/Haskell/strings/palindrome.hs) +- [Java](../../../algorithms/Java/strings/palindrome.java) +- [JavaScript](../../../algorithms/JavaScript/src/strings/palindrome.js) +- [Python](../../../algorithms/Python/strings/palindrome.py) +- [Rust](../../../algorithms/Rust/strings/palindrome/src/main.rs) + +## 影片網址 +[回文講解](https://www.bilibili.com/video/av4829276/) + +## 其他 +[维基百科](https://zh.wikipedia.org/wiki/%E5%9B%9E%E6%96%87)