What is the definition of a negative number divided by a positive number?

  • 0

    For example if I do -3/5 in python, it is -1. But the solution here requires 0. I am just confused. What is the commonly accepted definition?

  • 0

    One possibility is that it's making it an integer after using normal division...or in python terms:

    >>> int(-3/5)

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.