Ask your own question, for FREE!
Computer Science 59 Online
OpenStudy (anonymous):

My friend and I were having a debate. Say you have an array of names, like such " Andy Matt Jessica ... " I want to read in all the names into an array, using this... for( i=0;i

OpenStudy (anonymous):

You're right

OpenStudy (anonymous):

Generally names will be betwen say 3-10 letters so I would say you are correct.

OpenStudy (anonymous):

Just to add to previous comment, the length of names will not grow as more names are added, on average they will be say 6 letters.

OpenStudy (anonymous):

I spoke with my professor, and and he said my friend was right. He said to think about it like this. for (i=0;i<m;i++) //col for (j=0;j<n;j++) //row { Read } And that has O(n^2) complexity. We are supposed to think of it as an array of characters, not as a list of names. But I feel like if we do it as a list of names, then for sure, I would be right. Thanks!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!