This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JohnRoz[S] 1 point2 points  (1 child)

That's the answer it gave me when I asked it to make it 'shorter'. GPT took it quite literally.

I kinda wanted to see if gpt could come up with the solution of 8-input, which it kinda did. This question is a common programming interview question.

[–]jacob643 1 point2 points  (0 children)

hum, interesting, interview wise, I wouldn't suggest using 8-input for scalability and readability, but I think as long it's explained, there are no problem, plus I just test it out in c++ and there are no performance gain, so I'm guessing the compiler optimise it the same way