原创 6.5.6 Three Assignment to 1

6.5.6 Each exchange operation on line 5 of HEAP-INCREASE-KEY typically requires three assignments. Show how to use the

原创 5.3-6 PERMUTE-BY-SORTING, if two or more priorities are identical

Problem 5.3-6 Explain how to implement the algorithm PERMUTE-BY-SORTING to handle the case in which two or more priorit

原创 6-3 Young tableaus

6-3 Young tableaus An m × n Young tableau is an m × n matrix such that the entries of each row are in sorted order from

原创 9.1-2 Find the second smallest of n elements.

9.1-1 Show that the second smallest of n elements can be found with n + lg n - 2comparisons in the worst case. (Hint:

原创 6.5-8 Heap-Delete

6.5-8 The operation HEAP-DELETE.A; i / deletes the item in node i from heap A. Give an implementation of HEAP-DELETE th

原创 通過打印讀代碼

總結如下: 1. 在讀代碼的時候,你肯定會帶代碼中的某些變量的變化規律有某種猜想。 2. 那麼就把這些有猜想的變量打印出來,以驗證自己的猜想,從而把這種猜想變成很強的事實。 3. 將剛剛的猜想清零。 4. 這個時候你就又會有其他的猜想,於

原创 One way to improve running time

    For most puzzles, if we can understand what the question says, we will be able to give a direct answer. But that si

原创 這兩天實現了兩個可滑動控件的嵌套。

此處先留一個佔位的文章~~以後再來填上~ 問題是:當兩個可滑動View嵌套的時候, 1. 出來的佈局就會難以用xml控制。 2. 滑動事件也會亂套。 解決方案:

原创 團隊任務等待系統

在一個團隊中,經常會有某某人等待某某人完成某個事情之後,等待某個人通知的問題。 特點,這種等待關係可能會快速的變化,可能前後只有十五分鐘的時間。如果對於一個比較大的部分,比如兩個人相差20m。如果這種等待比較多的話,可能比較浪費時間。