MCPcopy Create free account
hub / github.com/LjyYano/LeetCode / L0029_DivideTwoIntegers

Class L0029_DivideTwoIntegers

src/main/java/L0029_DivideTwoIntegers.java:11–79  ·  view source on GitHub ↗

https://leetcode.cn/problems/divide-two-integers/ 给你两个整数,被除数 dividend 和除数 divisor。将两数相除,要求 不使用 乘法、除法和取余运算。 整数除法应该向零截断,也就是截去(truncate)其小数部分。例如,8.345 将被截断为 8 ,-2.7335 将被截断至 -2 。 返回被除数 dividend 除以除数 divisor 得到的商。 注意:假设我们的环境只能存储 32 位有符号整数,其数值范围是 [−2^31, 2^31 − 1] 。本题中,如果商严格大于 2^31 − 1 ,则返回 2^31 − 1 ;

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected