Binary Search Binary Search is a searching algorithm used in a sorted array by repeatedly dividing the search interval in half. The idea of binary search is to use the information that the array i...
Merge Sort
Preparation Same with the preparation of quick sort. Merge Sort The Merge Sort algorithm is a sorting algorithm that is based on the Divide and Conquer paradigm. In this algorithm, the array is ...
LeetCode 47. Permutations II
LeetCode 47. Permutations II (全排列 II) Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order. Example 1: Input: nums = [1,1,2] O...
Quick Sort
Quicksort is an efficient, general-purpose sorting algorithm. Of course, we could sort arrays with Standard Library or STL simply and quickly. However, sorting is a FAQ in interviews for a job. I w...
Writing Furigana With Markdown
There are millions of Japanese language learners such as me all over the world. Kanji (漢字) are the logographic Chinese characters taken from the Chinese script and used in the writing of Japanese. ...
Traumatized by Covid, but Ruled by a Party That Never Apologizes
Gripped with grief, anxiety and depression, many in China want a national reckoning over the hard-line “zero Covid” policy. Holding the government to account may be a quixotic quest. Dec. 15, 20...
LeetCode Biweekly Contest 90
Contest 1. Odd String Difference Question(Easy) You are given an array of equal-length strings words. Assume that the length of each string is n. Each string words[i] can be converted into a di...
LeetCode Weekly/Biweekly Contest 000
Contest Q1 (Easy) You are given an balabla. My solution during the contest Better solution Q2 (Middle) You are given an balabla. My solution during the contest Better solution Q3...
Test Post
Test Post It’s my first post.
China’s mental-health crisis is getting worse
Covid lockdowns and constant surveillance probably do not help It is no surprise that demand for psychotherapy is increasing in China. Take the residents of Shanghai, who recently suffered throu...