They can see patterns in what they do, but you have to tell it what to look for in patterns, then what to do with it.
If I had a microphone input, my form1 wouldn't start doing text to speech unless i told it i was speaking, and these words represent strings or actions, which we pickup as children.
And as children, we can't be told that they are actions, we learn. The day microsoft releases an application that can learn without being told what to learn, is the day computers learn.
The issue of what action to take after something is learned is not, strictly speaking, part of machine learning. As for whether computers can learn without being told what to learn, I think the answer is both yes and no. Yes in the sense of unsupervised learning
techniques such as clustering (K-means) that discover clusters within data via squared-distance minimization. No in the sense that even unsupervised learning techniques have various parameters that need to be adjusted to give reasonable solutions e.g. in K-means
one needs to specify the number of clusters. Incidentally, brain research has shown that a form of unsupervised learning -- competitive learning -- occurs when we learn about smells (olfaction). One application of this form of learning has been for object
My approach would have been to first solve the problem in the quickest (i.e. takes the shortest time to think of) way, likely using standard C++ library or the reverse-string approach. This would give me a chance to bring up the fact that I recognize that
I'm being paid by the minute to write code and that I'm interested in protecting the company's bottom-line and not just to fool around with a small piece of code and waste time doing unnecessary embellishments and speed optimizations. Once I'm sure the interviewer
gets my point about business considerations then I would qualify my first answer by saying however if the code proved (in about 2-3% of the time) to fall within the "critical" code category then I would next show the more efficient code (which I could be working
out in my head while mindlessly presenting the more obvious but inefficient one). Plenty of techies are good at being playfully ingenious but precious few realize that it is also important to show one's bosses that one is shares their companies' bottomline