DEV Community

Discussion on: Most Frequently asked Coding Questions

Collapse
 
jayjeckel profile image
Jay Jeckel • Edited

1.To swap two numbers without using an extra variable

I often ask this when doing interviews and I reject any candidate that doesn't point out that swapping two variables without using a temp variable is extremely bad practice and should never, never, never, never, never, never be done in a real project.

7.Program to check leap year or not

Likewise, the correct answer to this question is that dates are non-trivial and built-in packages should be used for any date handling or manipulation; one shouldn't be rolling their own logic for such things.

EDIT: I just noticed who the author is and I have to say I'm glad you are writing more articles. I love your vocabulary building series. :)

Collapse
 
vindhyasadanand profile image
vindhya Hegde

Thank you for reading the post and sharing your views