摘要:
C++中用new动态创建二维数组的格式一般是这样:TYPE (*p)[N] = new TYPE [][N];其中,TYPE是某种类型,N是二维数组的列数。采用这种格式,列数必须指出,而行数无需指定。在这里,p的类型是TYPE*[N],即是指向一个有N列元素数组的指针。还有一种方法,可以不指定数组的... 阅读全文
摘要:
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given s... 阅读全文
摘要:
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6,... 阅读全文