What would be your approach for interview- one liner or clean code? | SoloLearn: Learn to code for FREE!

+2

What would be your approach for interview- one liner or clean code?

Oneliner would show how effective you are (getting things done in less code). Clean code would show how understandable you are (using good identifier names that explain their job). I would prefer clean code. What about you?

11/8/2018 5:32:54 PM

Aditya Rana

4 Answers

New Answer

+5

Maybe a little of both. Take a one-liner and put it inside a function and comment it if necessary.

+3

If cleaner is faster one, it clearly wins. But if not, depends upon my mind state😜

+3

Depends on the job, if you're going to be working with a large team clean code is always preferable.

+3

In my opinion, the interviewers don't care if you can do one-liners and it won't impress them. Just try to solve the problems efficiently and with clean code