![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 | |
|
Hobbyist Programmer
Join Date: Oct 2005
Posts: 134
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#12 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Consider for a moment that your matrix, however implemented, may be addressed as matrix [r][c], where r is a row number and c is a column number. Address matrix [r][cDesiredColumn] for every r from rMin to rMax. If, at any point, you find a non-zero value, you do NOT have a column of zeroes; you're finished. If you reach the end without finding a non-zero element, you have a column of zeroes. Expand on that if you have further requirements or if your requirements weren't correctly expressed.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|