(int num)
| 5 | } |
| 6 | |
| 7 | public void add(int num) { |
| 8 | if(num==0){ |
| 9 | list.clear(); |
| 10 | return; |
| 11 | } |
| 12 | int prev = (list.size()==0)?1:list.get(list.size()-1); |
| 13 | list.add(prev * num); |
| 14 | } |
| 15 | |
| 16 | public int getProduct(int k) { |
| 17 | int s = list.size(); |
nothing calls this directly
no outgoing calls
no test coverage detected