摘要:
题目: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner 阅读全文
摘要:
题目: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 阅读全文
摘要:
1.开在栈里的数组(int a[n];)在出栈也就是函数结束时会释放掉,所以如果函数想返回一个数组的话,不能返回函数里面的数组的首地址,但是开在堆里(int *a=new int[n];)就可以。 2.栈空间有限,递归的时候注意层数不能太深,在函数里的数组不能太大。 阅读全文