Yes, experience and practice! Don't get bogged down with declaring tables and worrying about which function calls which. Conceive of the algorithm on paper... For example, if you are trying to write...