Welcome to MSDN Blogs Sign in | Join | Help

Bill Li

Think globally, act locally.

Syndication

News

These postings are provided "AS IS" with no warranties, and confers no rights.


Browse by Tags

All Tags » perf   (RSS)
Searching For a Number in Shifted Sorted Array within O(log(n)) time
Run into the algorithm problem long time ago. Now post my answer here. A sorted array, say: {1,2,3,4,5,6,7,8,9,10,11,12}, do right rotate through carry unknown times, and then it might become: {6,7,8,9,10,11,12,1,2,3,4,5}. Now we need get the index of Read More...

Posted Tuesday, February 03, 2009 11:50 PM by Bali | 1 Comments

Filed under: , ,

Multi-threading your UI
Basically, window app UI, either WPF or traditional WinForm, is single threaded, which means only one thing can happen in the UI at any given time. To be specific, it is not generally possible to create an object on one thread, and access it from another. Read More...

Posted Monday, December 15, 2008 6:19 PM by Bali | 1 Comments

Filed under: , ,

Selecting median of two sorted arrays
In this post, I’d like to discuss one interesting algorithm problem which took me quite a while to find an ideal solution. The problem is as followings: Array A and B are sorted with length of m and n respectively. Try to select median of the two arrays Read More...

Posted Monday, September 22, 2008 6:46 PM by Bali | 4 Comments

Filed under: , ,

How to utilize double check locking in C# correctly
The major benefit of double check locking is to reduce the overhead of acquiring a lock by first testing the locking in an unsafe manner under a multi-threaded environment. It is widely used in the scenarios such as lazy initialization. Typical pseudo Read More...

Posted Monday, September 15, 2008 12:46 AM by Bali | 6 Comments

Filed under: ,

Page view tracker