Characters and Words:
Week 3
Lesson 9:
1. xué
2. shēng (shēng hái zi, xué sheng, nǚ shēng) 3. xí (xué
xí) 4. lǎo (lǎo rén) 5. shī (lǎo
shī) 6. wén (wén xué, wén zǐ, zuò wén)
Lesson 10:
1. dà (dà
rén, dà xué, dà xué shēng) 2. xiǎo (xiǎo háir, xiǎo xué, xiǎo
xué shēng, dà xiǎo) 3. duō 4. shǎo (duō
shao) 5. hǎo (hǎo duō, hǎo rén) 6. huài (huài
rén., huài hǎo)
Lesson 11:
1. lái 2. qù 3. jìn (jìn lai, jìn qu) 4. chū (chū lai, chū qu, chū shēng) 5. kāi (kāi xué) 6. guān (kāi guān)
Lesson 12:
1. cháng 2. duǎn (cháng duǎn) 3. gāo (gāo gè zi) 4. xìng (gāo xìng) 5. xīn (xīn shēng) 6. jiù (xīn jiù)
Previous
from Coursera Chinese Characters for beginner 汉字 by Peking University
Link: https://www.coursera.org/learn/hanzi/home
25 April 2017
22 April 2017
Hanzi Week 2
Characters and Words:
Week 2
Lesson 5:
1. nǐ 2. tā 3. men (rén men, nǐ men, tā men) 4. zuò (gōng zuò) 5. shén 6. me (shén me)
Lesson 6:
1. nǚ (nǚ rén) 2. tā (tā men) 3. mā (mā ma) 4. jiě (jiě jie) 5. mèi (mèi mei, jiě mèi) 6. nǎi (nǎi nai)
Lesson 7:
1. fù 2. qīn (fù qin) 3. bà (bà ba) 4. yé (yé ye) 5. mǔ (mǔ qin, fù mǔ) 6. wǒ (wǒ men)
Lesson 8:
1. ér (nǚ ér) 2. zǐ (ér zi, gè zi, zǐ nǚ) 3. sūn (sūn zi, sūn nü) 4. hái (hái zi, nü háir) 5. míng 6. zì ( míng zi)
Previous Next
from Coursera Chinese Characters for beginner 汉字 by Peking University
Link: https://www.coursera.org/learn/hanzi/home
Week 2
Lesson 5:
1. nǐ 2. tā 3. men (rén men, nǐ men, tā men) 4. zuò (gōng zuò) 5. shén 6. me (shén me)
Lesson 6:
1. nǚ (nǚ rén) 2. tā (tā men) 3. mā (mā ma) 4. jiě (jiě jie) 5. mèi (mèi mei, jiě mèi) 6. nǎi (nǎi nai)
Lesson 7:
1. fù 2. qīn (fù qin) 3. bà (bà ba) 4. yé (yé ye) 5. mǔ (mǔ qin, fù mǔ) 6. wǒ (wǒ men)
Lesson 8:
1. ér (nǚ ér) 2. zǐ (ér zi, gè zi, zǐ nǚ) 3. sūn (sūn zi, sūn nü) 4. hái (hái zi, nü háir) 5. míng 6. zì ( míng zi)
Previous Next
from Coursera Chinese Characters for beginner 汉字 by Peking University
Link: https://www.coursera.org/learn/hanzi/home
21 April 2017
Hanzi Week 1
Characters and Words:
Week 1
Lesson 1:
1. yī 2. èr 3. sān 4. liù 5. bā 6. shí (shí yī, shí èr, shí sān, shí liù, shí bā, èr shí, sān shí, liù shí, bā shí)
Lesson 2:
1. sì (shí sì, sì shí) 2. wǔ (shí wǔ, wǔ shí) 3. qī (shí qī, qī shí) 4. jiǔ (shí jiǔ, jiǔ shí) 5. gè 6. liǎng (liǎng gè)
Lesson 3:
1. jǐ (jǐ gè) 2. bàn (bàn gè, yí bàn) 3. bǎi (yì bǎi, sān bǎi) 4. qiān (yì qiān, wǔ qiān) 5. wàn (yí wàn) 6. rén
Lesson 4:
1. gōng (gōng rén) 2. gān 3. tiān (yì tiān, liǎng tiān, bàn tiān) 4. jīn (jīn tiān) 5, fū 6. zhàng (zhàng fu)
Next
from Coursera Chinese Characters for beginner 汉字 by Peking University
Link: https://www.coursera.org/learn/hanzi/home
Week 1
Lesson 1:
1. yī 2. èr 3. sān 4. liù 5. bā 6. shí (shí yī, shí èr, shí sān, shí liù, shí bā, èr shí, sān shí, liù shí, bā shí)
Lesson 2:
1. sì (shí sì, sì shí) 2. wǔ (shí wǔ, wǔ shí) 3. qī (shí qī, qī shí) 4. jiǔ (shí jiǔ, jiǔ shí) 5. gè 6. liǎng (liǎng gè)
Lesson 3:
1. jǐ (jǐ gè) 2. bàn (bàn gè, yí bàn) 3. bǎi (yì bǎi, sān bǎi) 4. qiān (yì qiān, wǔ qiān) 5. wàn (yí wàn) 6. rén
Lesson 4:
1. gōng (gōng rén) 2. gān 3. tiān (yì tiān, liǎng tiān, bàn tiān) 4. jīn (jīn tiān) 5, fū 6. zhàng (zhàng fu)
Next
from Coursera Chinese Characters for beginner 汉字 by Peking University
Link: https://www.coursera.org/learn/hanzi/home
12 April 2017
deleteDigit
My solution:
Previous Next
int deleteDigit(int n) { return int.Parse(n.ToString().Select((c, i) => n.ToString().Remove(i, 1)).Max());; }
Previous Next
Labels:
Arcade,
C#,
CodeSignal,
Intro,
Rainbow of Clarity
chessKnight
My solution:
Previous Next
int chessKnight(string cell) { var possible_moves = new List<string>(); // Upward if (int.Parse(cell[1].ToString()) + 2 <= 8) { if (cell[0] >= 'b') possible_moves.Add((char)(cell[0] - 1) + ((char) (cell[1] + 2)).ToString()); if (cell[0] <= 'g') possible_moves.Add((char)(cell[0] + 1) + ((char)(cell[1] + 2)).ToString()); } // Rightward if (cell[0] <= 'f') { if (int.Parse(cell[1].ToString()) <= 7) possible_moves.Add((char)(cell[0] + 2) + ((char)(cell[1] + 1)).ToString()); if (int.Parse(cell[1].ToString()) >= 2) possible_moves.Add((char)(cell[0] + 2) + ((char)(cell[1] - 1)).ToString()); } // Downward if (int.Parse(cell[1].ToString()) - 2 >= 1) { if (cell[0] >= 'b') possible_moves.Add((char)(cell[0] - 1) + ((char)(cell[1] - 2)).ToString()); if (cell[0] <= 'g') possible_moves.Add((char)(cell[0] + 1) + ((char)(cell[1] - 2)).ToString()); } // Leftward if (cell[0] >= 'c') { if (int.Parse(cell[1].ToString()) <= 7) possible_moves.Add((char)(cell[0] - 2) + ((char)(cell[1] + 1)).ToString()); if (int.Parse(cell[1].ToString()) >= 2) possible_moves.Add((char)(cell[0] - 2) + ((char)(cell[1] - 1)).ToString()); } return possible_moves.Count; }
Previous Next
Labels:
Arcade,
C#,
CodeSignal,
Intro,
Rainbow of Clarity
lineEncoding
My solution:
Previous Next
string lineEncoding(string s) { var c = new char(); var answer = string.Empty; var counter = 0; for (var i = 0; i < s.Length; i++) { if (c == '\0') { c = s[i]; counter++; } else if (c == s[i]) { counter++; if (i == s.Length - 1) answer += counter.ToString() + c; } else { if (counter > 1) answer += counter.ToString() + c; else answer += c; c = s[i]; counter = 1; if (i == s.Length - 1) answer += c; } } return answer; }
Previous Next
Labels:
Arcade,
C#,
CodeSignal,
Intro,
Rainbow of Clarity
Subscribe to:
Comments (Atom)