i need to write algo for this problem. i have never written an algo before . please correct me.
there is a list which contains four collumns each with numbers with upto 5 digits and about 10 rows in total. we have to remove the rows containng any number with less than 3 digits.
here is how i have tried
- read list into multi-dimensional array
- for each number in the array
if numdigits < 3
delete all numbers of that row
i know this is not the correct algorithm . can you help me correct it .
When creating your original list, rather check the individual values then, and not add it to that list if any of the numbers has less than 3 digits, that way reducing the original list size.
EDIT:
Something like that.