Small problem - you need to find the length first. Which means you need
to scan each string, and use the smaller.
So, instead of iterating in some fashion over the strings once, you
iterate over one string calculating its length. You iterate over the
other string to find its length. Then you iterate over both strings
comparing them.
Wouldn't it be faster just to iterate over both strings at the same time
only once?
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/