Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Divide Two Integers

https://oj.leetcode.com/problems/divide-two-integers/

O(log n) time complexity, O(1) space complexity.

divide_two_integers.v1.Solution(460 ms time cost): Simulate the process of binary long division without long type. This is to find 0 <= b[0..31] <= 1 that satisfies dividend = b0divisor2^31 + b1divisor2^30 +...+ b31divisor2^0