career cup: 1.6 and 1.7 and 2

1. for two dimensional array matrix[i][j], i is row, j is column

2. You can not change the matrix value through for each loop's iterator.

3. the default value of int is 0, so set col[j] to 1 to indicate you find 0 at matrix[i][j], otherwise all value of col is 0

4. several way of making two values knowable to all methods on stack, when writing recursions:(it is hard, because method can only return on value)

(1) make them static

(2) wrap them in a class and return that class

(3) change all primitive values to wrapper class, so that the reference in methods can sense their changes like a pointer in C/C++

5. delete a node of singly lined list without giving you its head node:

(1)copy the data over from next node to the current node and then delete the next node

(2)if the node you want to delete is the last node in the list. There is no way to delete it. But you can consider making it as dummy

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值