Angad Sandhu
Search
Browse

50_Pow_x_n

Source name
50_Pow_x_n.py
# File: Leetcode/Solutions/50_Pow_x_n.py

"""
Problem Number: 50
Problem Name: Pow(x, n)
Difficulty: Medium
Tags: Math, Binary Exponentiation, Neetcode 150
Company (Frequency): Amazon, Google, Facebook, Microsoft, Apple
Leetcode Link: <https://leetcode.com/problems/powx-n/description/>

DESCRIPTION

Compute x^n (double), where n can be negative.
Approaches:

* Fast exponentiation (binary exponentiation) O(log n).
"""

Browse the library