08 2013 档案

摘要:Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="aadbbbaccc", return false.#include #include #include /**Given s1, s2, s3, find whether s3 is formed by the int 阅读全文
posted @ 2013-08-27 22:50 一只会思考的猪 阅读(522) 评论(0) 推荐(0)
摘要:http://fihopzz.blogspot.com/2013/07/enter-post-title-here-binary-search-and.html 阅读全文
posted @ 2013-08-01 18:10 一只会思考的猪 阅读(137) 评论(0) 推荐(0)
摘要:class rw_lock_t { int NoOfReaders; int NoOfWriters, NoOfWritersWaiting; pthread_mutex_t class_mutex; pthread_cond_t reader_gate; pthread_cond_t writer_gate;public: rw_lock_t() : NoOfReaders(0), NoOfWriters(0), NoOfWritersWating(0), class_mutex(PTHREAD_MUTEX_INITIALIZER), ... 阅读全文
posted @ 2013-08-01 17:40 一只会思考的猪 阅读(287) 评论(0) 推荐(0)