r/ProgrammerHumor • • 3d ago

Meme technicallyCorrect

Post image
1.6k Upvotes

51 comments sorted by

View all comments

Show parent comment

75

u/MisinformedGenius 3d ago

I actually used to kick off phone screens with asking how they would print out a multiplication table. A nested for loop was the correct answer, but suggesting hard-coding the tables (and better yet, explaining when that would be appropriate and when it wouldn’t) was some bonus points. 

32

u/dangderr 3d ago

How many points for saying data should be in a database, and then just making a query to grab the records?

7

u/MisinformedGenius 3d ago

Do you mean rather than hard-coding individual examples? That’s fine.

3

u/Impossible_Dog_7262 2d ago

Is there any bonus points for bringing up the symmetry and having the range being i:0->n and j: i->n?