摘要: http://www.geeksforgeeks.org/generate-all-possible-sorted-arrays-from-alternate-elements-of-two-given-arrays/Given two sorted arrays A and B, generate... 阅读全文
posted @ 2015-07-09 11:37 wxyang 阅读(317) 评论(0) 推荐(0)
摘要: Given an unsorted array of n integers which can contain integers from 1 to n. Some elements can be repeated multiple times and some other elements can... 阅读全文
posted @ 2015-06-26 18:09 wxyang 阅读(183) 评论(0) 推荐(0)
摘要: 这是一道Google电面题:实现一个InterleavingIterator的class,其输入是Iterator>,包含hasNext()和Next()两个方法,要求是调用next()时能够交替输出输入的数据,比如:假设输入是:a1, a2, a3, a4, ..., an;b1, b2, b3,... 阅读全文
posted @ 2015-06-01 20:34 wxyang 阅读(992) 评论(0) 推荐(0)
摘要: Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing the order ... 阅读全文
posted @ 2015-04-16 11:18 wxyang 阅读(285) 评论(0) 推荐(0)
摘要: 不积跬步,无以至千里;不积小流,无以成江海。不会写文章,但趁着有时间,记录和总结读过的书和paper,见过的和写过的算法,看过的视频,以求更深刻的理解所学的知识。这是一个新的开始,但愿持之以恒的努力下去。 阅读全文
posted @ 2015-03-03 13:09 wxyang 阅读(96) 评论(0) 推荐(0)